diff options
Diffstat (limited to 'spec/unit/util/fact.rb')
-rwxr-xr-x | spec/unit/util/fact.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/util/fact.rb b/spec/unit/util/fact.rb index 1652032..cee70b9 100755 --- a/spec/unit/util/fact.rb +++ b/spec/unit/util/fact.rb @@ -121,6 +121,13 @@ describe Facter::Util::Fact do @fact.value.should be_nil end + + it "should timeout after 0.5 seconds" do + @fact.expects(:warn) + @fact.add { setcode { sleep 2; raise "This is a test" } } + + @fact.value.should be_nil + end end it "should have a method for flushing the cached fact" do |