File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
spec/rspec/rails/matchers Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ def matches?(*)
21
21
match_check
22
22
end
23
23
24
+ # Uses normalize_argument_to_redirection to find and format
25
+ # the redirect location. normalize_argument_to_redirection is private
26
+ # in ActionDispatch::Assertions::ResponseAssertions so we call it
27
+ # here using #send. This will keep the error message format consistent
28
+ # @api private
24
29
def check_redirect
25
30
response = @scope . response
26
31
return unless response . respond_to? ( :redirect? ) && response . redirect?
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ def assert_template(*)
95
95
message = "expecting <'template_name'> but rendering with <[]>"
96
96
raise ActiveSupport ::TestCase ::Assertion . new ( message )
97
97
end
98
- def normalize_argument_to_redirection ( * )
98
+ def normalize_argument_to_redirection ( response_redirect_location )
99
99
"http://test.host/widgets/1"
100
100
end
101
101
it "gives informative error message" do
You can’t perform that action at this time.
0 commit comments