summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorSteven Hajducko <sjmh@phase2.net>2008-06-19 21:34:52 -0700
committerSteven Hajducko <sjmh@phase2.net>2008-06-19 21:34:52 -0700
commite22b4087b368cc29ac37459950359fa1b7487fb6 (patch)
treede8c86a060f6ed766848cfee39698184827922cf /spec
parent145cee279bf61cbc737c9b767c3641937020790a (diff)
downloadfacter-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-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