From 76a0fabb5b0841107d980b94221eb0062d7eb598 Mon Sep 17 00:00:00 2001 From: Nicolae Claudius Date: Tue, 29 Nov 2011 11:55:17 -0800 Subject: [PATCH] fix domain test, generic dependecies --- spec/models/domain_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/models/domain_spec.rb b/spec/models/domain_spec.rb index 13e40b5..66f6a99 100644 --- a/spec/models/domain_spec.rb +++ b/spec/models/domain_spec.rb @@ -8,14 +8,14 @@ describe Domain do end it "has correct ns records" do - domain.should have(2).ns_records + domain.should have(Settings.ns.count).ns_records for record in domain.ns_records record.should be_persisted end end it "has correct records" do - domain.records.count.should == 3 + domain.records.count.should == Settings.ns.count+1 end it "has a soa serial updated" do @@ -25,7 +25,7 @@ describe Domain do it "updates name to records when name changed" do domain.update_attributes(:name => "changed#{domain.name}") domain.soa_record.name.should == domain.name - domain.records.all.size.should == 3 + domain.records.all.size.should == Settings.ns.count+1 for record in domain.records.all record.name.should =~ /#{domain.name}$/ end