Created
July 25, 2010 14:47
-
-
Save iain/489606 to your computer and use it in GitHub Desktop.
This file contains 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
module RSpec | |
module Expectations | |
# If Test::Unit is loaed, we'll use its error as baseclass, so that Test::Unit | |
# will report unmet RSpec expectations as failures rather than errors. | |
superclass = ['Test::Unit::AssertionFailedError', '::StandardError'].map do |c| | |
eval(c) rescue nil | |
end.compact.first | |
class ExpectationNotMetError < superclass | |
def spec_failure? | |
true | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment