summary refs log tree commit diff
diff options
context:
space:
mode:
authorGabriel Horner <gabriel.horner@gmail.com>2012-03-20 18:02:51 -0400
committerGabriel Horner <gabriel.horner@gmail.com>2012-03-20 18:07:39 -0400
commitd62f978a857c6f63df14830d85b3380c9f408cbd (patch)
tree2960cb89a26e168c38dd3dffa1948524026075ef
parentf7b956b02c8b14d63a100c9345b06133ecdd424a (diff)
downloadbacon-d62f978a857c6f63df14830d85b3380c9f408cbd.tar.gz
bacon-d62f978a857c6f63df14830d85b3380c9f408cbd.tar.xz
bacon-d62f978a857c6f63df14830d85b3380c9f408cbd.zip
fix should.change tests failing intermittently on jruby + 1.8.7
see http://travis-ci.org/#!/cldwalker/bacon/builds/910141
tests were running so fast that Time.now remains the same
-rw-r--r--test/spec_bacon.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/spec_bacon.rb b/test/spec_bacon.rb
index bd4cfbf..c14a180 100644
--- a/test/spec_bacon.rb
+++ b/test/spec_bacon.rb
@@ -71,7 +71,7 @@ describe "Bacon" do
   end
 
   it "should have should.change" do
-    lambda { lambda {}.should.change { Time.now } }.should succeed
+    lambda { lambda {}.should.change { sleep 0.001; Time.now } }.should succeed
 
     lambda {
       i = 1
@@ -83,7 +83,7 @@ describe "Bacon" do
       lambda { i *= 2 }.should.change { i }
     }.should fail
 
-    lambda { should.change { Time.now } }.should succeed
+    lambda { should.change { sleep 0.001; Time.now } }.should succeed
     lambda { should.change { 42 } }.should fail
   end