| Class | Merb::Test::Rspec::ControllerMatchers::BeError |
| In: |
merb-core/lib/merb-core/test/matchers/controller_matchers.rb
|
| Parent: | Object |
# File merb-core/lib/merb-core/test/matchers/controller_matchers.rb, line 35
35: def initialize(expected)
36: @expected = expected
37: end
# File merb-core/lib/merb-core/test/matchers/controller_matchers.rb, line 45
45: def failure_message
46: "expected #{@target} to be a #{@expected} error, but it was " <<
47: @target.request.exceptions.first.inspect
48: end
# File merb-core/lib/merb-core/test/matchers/controller_matchers.rb, line 39
39: def matches?(target)
40: @target = target
41: @target.request.exceptions &&
42: @target.request.exceptions.first.is_a?(@expected)
43: end