openstreetmap-website/vendor/gems/rspec-1.1.2/lib/spec/expectations/errors.rb
2008-01-22 16:39:09 +00:00

12 lines
392 B
Ruby

module Spec
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
end
end
end