Browse files

Works around failures of the test suite under Rubinius

rubinius-2.0.0dev :001 > (Time.now - Time.now).class
=> Float
rubinius-2.0.0dev :002 > MyTime = Time.dup
=> MyTime
rubinius-2.0.0dev :003 > (MyTime.now - MyTime.now).class
=> Time

On MRI, the last line reads `Float`, which is what we expected before
this commit.
  • Loading branch information...
1 parent 8f3944f commit 96e3d1348084d0c63882ba44e477e2fe46ee2d1d @alindeman alindeman committed Oct 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/rspec/core/reporter.rb
View
2 lib/rspec/core/reporter.rb
@@ -89,7 +89,7 @@ def finish(seed)
alias_method :abort, :finish
def stop
- @duration = RSpec::Core::Time.now - @start if @start
+ @duration = (RSpec::Core::Time.now - @start).to_f if @start
notify :stop
end

0 comments on commit 96e3d13

Please sign in to comment.