Class Merb::Test::Rspec::ControllerMatchers::BeError
In: merb-core/lib/merb-core/test/matchers/controller_matchers.rb
Parent: Object

Methods

Public Class methods

[Source]

    # File merb-core/lib/merb-core/test/matchers/controller_matchers.rb, line 35
35:     def initialize(expected)
36:       @expected = expected
37:     end

Public Instance methods

[Source]

    # 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

[Source]

    # 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

[Source]

    # File merb-core/lib/merb-core/test/matchers/controller_matchers.rb, line 50
50:     def negative_failure_message
51:       "expected #{@target} not to be a #{@expected} error, but it was"
52:     end

[Validate]