aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2016-05-28 22:26:45 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2016-05-28 22:26:45 +0200
commite45f388eb439448f4f87eabcef1bc01a14faa4a5 (patch)
tree72901b9cb4d2df067205e65fdf4907cf3ec1345c /railties
parentaf245aaf3a1c447752a1b5895adddc66e5f73c00 (diff)
downloadrails-e45f388eb439448f4f87eabcef1bc01a14faa4a5.tar.gz
rails-e45f388eb439448f4f87eabcef1bc01a14faa4a5.tar.bz2
rails-e45f388eb439448f4f87eabcef1bc01a14faa4a5.zip
Fix assertion count after 69e1bb52.
When changing the generated integration tests to assert redirects with an absolute path this redirection check in `assert_redirected_to` against the absolute response location would now pass: https://github.com/rails/rails/blob/af245aaf3a1c447752a1b5895adddc66e5f73c00/actionpack/lib/action_dispatch/testing/assertions/response.rb#L55 Thus we'd break early instead of hitting `assert_operator` and have 2 fewer assertions per `assert_redirected_to` as `assert_operator` is composed of 2 assertions internally: https://github.com/seattlerb/minitest/blob/4e146b1515b19a5c474e39c174b037510f6dbc6e/lib/minitest/assertions.rb#L254-L258 Deduct 2 assertions for 2 redirects taking the expected count down by 4 in total for the two failing tests.
Diffstat (limited to 'railties')
-rw-r--r--railties/test/application/rake_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb
index acdb4e7d79..badb9ecdd6 100644
--- a/railties/test/application/rake_test.rb
+++ b/railties/test/application/rake_test.rb
@@ -287,7 +287,7 @@ module ApplicationTests
RAILS_ENV=test bin/rails db:migrate test`
end
- assert_match(/7 runs, 12 assertions, 0 failures, 0 errors/, output)
+ assert_match(/7 runs, 9 assertions, 0 failures, 0 errors/, output)
assert_no_match(/Errors running/, output)
end
@@ -318,7 +318,7 @@ module ApplicationTests
RAILS_ENV=test bin/rails db:migrate test`
end
- assert_match(/7 runs, 12 assertions, 0 failures, 0 errors/, output)
+ assert_match(/7 runs, 9 assertions, 0 failures, 0 errors/, output)
assert_no_match(/Errors running/, output)
end