diff options
author | Steven Hajducko <sjmh@phase2.net> | 2008-06-19 21:34:52 -0700 |
---|---|---|
committer | Steven Hajducko <sjmh@phase2.net> | 2008-06-19 21:34:52 -0700 |
commit | e22b4087b368cc29ac37459950359fa1b7487fb6 (patch) | |
tree | de8c86a060f6ed766848cfee39698184827922cf /spec | |
parent | 145cee279bf61cbc737c9b767c3641937020790a (diff) | |
download | facter-e22b4087b368cc29ac37459950359fa1b7487fb6.tar.gz facter-e22b4087b368cc29ac37459950359fa1b7487fb6.tar.xz facter-e22b4087b368cc29ac37459950359fa1b7487fb6.zip |
Changed 'timeout' option to 'limit'
This was done to avoid a possible variable scoping issue
that was occuring on some AIX systems.
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/util/collection.rb | 6 | ||||
-rwxr-xr-x | spec/unit/util/resolution.rb | 6 |
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 |