summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/util/collection.rb6
-rwxr-xr-xspec/unit/util/resolution.rb6
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/util/collection.rb b/spec/unit/util/collection.rb
index 7585a52..a526ed3 100755
--- a/spec/unit/util/collection.rb
+++ b/spec/unit/util/collection.rb
@@ -64,7 +64,7 @@ describe Facter::Util::Collection do
resolve = Facter::Util::Resolution.new(:myname) {}
fact.expects(:add).returns resolve
- @coll.add(:myname, :timeout => "myval") {}
+ @coll.add(:myname, :limit => "myval") {}
end
it "should not pass fact-specific options to resolutions" do
@@ -75,9 +75,9 @@ describe Facter::Util::Collection do
fact.expects(:add).returns resolve
fact.expects(:ldapname=).with("foo")
- resolve.expects(:timeout=).with("myval")
+ resolve.expects(:limit=).with("myval")
- @coll.add(:myname, :timeout => "myval", :ldapname => "foo") {}
+ @coll.add(:myname, :limit => "myval", :ldapname => "foo") {}
end
it "should fail if invalid options are provided" do
diff --git a/spec/unit/util/resolution.rb b/spec/unit/util/resolution.rb
index e546713..462bf17 100755
--- a/spec/unit/util/resolution.rb
+++ b/spec/unit/util/resolution.rb
@@ -18,11 +18,11 @@ describe Facter::Util::Resolution do
end
it "should support a timeout value" do
- Facter::Util::Resolution.new("yay").should respond_to(:timeout=)
+ Facter::Util::Resolution.new("yay").should respond_to(:limit=)
end
it "should default to a timeout of 0.5 seconds" do
- Facter::Util::Resolution.new("yay").timeout.should == 0.5
+ Facter::Util::Resolution.new("yay").limit.should == 0.5
end
describe "when setting the code" do
@@ -93,7 +93,7 @@ describe Facter::Util::Resolution do
it "should timeout after the provided timeout" do
@resolve.expects(:warn)
- @resolve.timeout = 0.1
+ @resolve.limit = 0.1
@resolve.setcode { sleep 2; raise "This is a test" }
@resolve.value.should be_nil