RSpec::Matchers::BuiltIn::BaseMatcher
# File lib/rspec/rails/matchers/redirect_to.rb, line 5 def initialize(scope, expected) @expected = expected @scope = scope end
@api private
# File lib/rspec/rails/matchers/redirect_to.rb, line 18 def failure_message_for_should rescued_exception.message end
# File lib/rspec/rails/matchers/redirect_to.rb, line 23 def failure_message_for_should_not "expected not to redirect to #{@expected.inspect}, but did" end
# File lib/rspec/rails/matchers/redirect_to.rb, line 11 def matches?(_) match_unless_raises ActiveSupport::TestCase::Assertion do @scope.assert_redirected_to(@expected) end end
[Validate]
Generated with the Darkfish Rdoc Generator 2.