Parent

Included Modules

Class/Module Index [+]

Quicksearch

RSpec::Rails::Matchers::RedirectTo::RedirectTo

Public Class Methods

new(scope, expected) click to toggle source
# File lib/rspec/rails/matchers/redirect_to.rb, line 6
def initialize(scope, expected)
  super(expected)
  @scope = scope
end

Public Instance Methods

failure_message_for_should() click to toggle source

@api private

# File lib/rspec/rails/matchers/redirect_to.rb, line 19
def failure_message_for_should
  rescued_exception.message
end
failure_message_for_should_not() click to toggle source

@api private

# File lib/rspec/rails/matchers/redirect_to.rb, line 24
def failure_message_for_should_not
  "expected not to redirect to #{expected.inspect}, but did"
end
matches?(actual) click to toggle source

@api private

# File lib/rspec/rails/matchers/redirect_to.rb, line 12
def matches?(actual)
  match_unless_raises ActiveSupport::TestCase::Assertion do
    @scope.assert_redirected_to(expected)
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.