Created
October 2, 2012 19:58
-
-
Save joshuaclayton/3822920 to your computer and use it in GitHub Desktop.
Attempt at ensuring a test takes at most four seconds before failing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/joshuaclayton/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rspec-core-2.10.1/lib/rspec/core/formatters/base_text_formatter.rb:181:in `dump_failure_info': You have a nil object when you didn't expect it! (NoMethodError) | |
You might have expected an instance of Array. | |
The error occurred while evaluating nil.<< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
around do |example| | |
begin | |
Timeout::timeout(4) do | |
example.run | |
end | |
rescue Timeout::Error => e | |
fail 'Test took too long to complete' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment