Parent

Class/Module Index [+]

Quicksearch

Merb::Test::Rspec::ControllerMatchers::BeError

Public Class Methods

new(expected) click to toggle source
# File lib/merb-core/test/matchers/controller_matchers.rb, line 35
def initialize(expected)
  @expected = expected
end

Public Instance Methods

failure_message() click to toggle source
# File lib/merb-core/test/matchers/controller_matchers.rb, line 45
def failure_message
  "expected #{@target} to be a #{@expected} error, but it was " << 
    @target.request.exceptions.first.inspect
end
matches?(target) click to toggle source
# File lib/merb-core/test/matchers/controller_matchers.rb, line 39
def matches?(target)
  @target = target
  @target.request.exceptions &&
    @target.request.exceptions.first.is_a?(@expected)
end
negative_failure_message() click to toggle source
# File lib/merb-core/test/matchers/controller_matchers.rb, line 50
def negative_failure_message
  "expected #{@target} not to be a #{@expected} error, but it was"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.