File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
spec/rspec/rails/matchers Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 4
4
include RSpec ::Rails ::Matchers
5
5
6
6
def create_response ( opts = { } )
7
- ActionController ::TestResponse . new ( opts . fetch ( :status ) )
7
+ ActionDispatch ::TestResponse . new ( opts . fetch ( :status ) )
8
8
end
9
9
10
10
shared_examples_for "supports different response instances" do
Original file line number Diff line number Diff line change 3
3
%w[ have_rendered render_template ] . each do |template_expectation |
4
4
describe template_expectation do
5
5
include RSpec ::Rails ::Matchers ::RenderTemplate
6
- let ( :response ) { ActionController ::TestResponse . new }
6
+ let ( :response ) { ActionDispatch ::TestResponse . new }
7
7
8
8
context "given a hash" do
9
9
it "delegates to assert_template" do
@@ -90,7 +90,7 @@ def assert_template(*); raise "oops"; end
90
90
end
91
91
92
92
context "when fails with a redirect" do
93
- let ( :response ) { ActionController ::TestResponse . new ( 302 ) }
93
+ let ( :response ) { ActionDispatch ::TestResponse . new ( 303 ) }
94
94
95
95
def assert_template ( *)
96
96
message = "expecting <'template_name'> but rendering with <[]>"
@@ -102,7 +102,7 @@ def normalize_argument_to_redirection(response_redirect_location)
102
102
end
103
103
104
104
it "gives informative error message" do
105
- response = ActionController ::TestResponse . new ( 302 )
105
+ response = ActionDispatch ::TestResponse . new ( 302 )
106
106
response . location = "http://test.host/widgets/1"
107
107
expect do
108
108
expect ( response ) . to send ( template_expectation , "template_name" )
Original file line number Diff line number Diff line change 5
5
describe "redirect_to" do
6
6
include RSpec ::Rails ::Matchers ::RedirectTo
7
7
8
- let ( :response ) { ActionController ::TestResponse . new }
8
+ let ( :response ) { ActionDispatch ::TestResponse . new }
9
9
10
10
context "with should" do
11
11
context "when assert_redirected_to passes" do
You can’t perform that action at this time.
0 commit comments