]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/lib/spec/expectations/errors.rb
added RSpec and RSpec on Rails
[rails.git] / vendor / gems / rspec-1.1.2 / lib / spec / expectations / errors.rb
1 module Spec
2   module Expectations
3     # If Test::Unit is loaed, we'll use its error as baseclass, so that Test::Unit
4     # will report unmet RSpec expectations as failures rather than errors.
5     superclass = ['Test::Unit::AssertionFailedError', '::StandardError'].map do |c|
6       eval(c) rescue nil
7     end.compact.first
8     
9     class ExpectationNotMetError < superclass
10     end
11   end
12 end