123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Namespace Children
Classes:
Extension / Inclusion / Inheritance Descendants
Included In:
Defined in: rspec-rails/lib/rspec/rails/matchers/redirect_to.rb

Overview

Matcher for redirects.

Instance Method Summary

Instance Method Details

#redirect_to(target)

Delegates to assert_redirected_to.

Examples:

expect(response).to redirect_to(:action => "new")
[ GitHub ]

  
# File 'rspec-rails/lib/rspec/rails/matchers/redirect_to.rb', line 32

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