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

Included in:
ControllerExampleGroup, RequestExampleGroup
Defined in:
lib/rspec/rails/matchers/redirect_to.rb

Defined Under Namespace

Classes: RedirectTo

Instance Method Summary collapse

Instance Method Details

#redirect_to(target) ⇒ Object

Delegates to ‘assert_redirected_to`

Examples:


response.should redirect_to(:action => "new")


34
35
36
# File 'lib/rspec/rails/matchers/redirect_to.rb', line 34

def redirect_to(target)
  RedirectTo.new(self, target)
end