diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-01-26 13:15:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 13:15:30 -0500 |
commit | 85fcb663363cd27220e8bd3136973cc3408cf7d7 (patch) | |
tree | 8521ed5477f475e1de8bcb89b689bbd3b1abeae8 /actionpack/test/dispatch/response_test.rb | |
parent | 8baca31dbe522cb407f0b3b8c8d3d4a6804e5aed (diff) | |
parent | fda1863e1a8c120294c56482631d8254ad6125ff (diff) | |
download | rails-85fcb663363cd27220e8bd3136973cc3408cf7d7.tar.gz rails-85fcb663363cd27220e8bd3136973cc3408cf7d7.tar.bz2 rails-85fcb663363cd27220e8bd3136973cc3408cf7d7.zip |
Merge pull request #31786 from composerinteralia/respond-to-tests
Use respond_to test helpers
Diffstat (limited to 'actionpack/test/dispatch/response_test.rb')
-rw-r--r-- | actionpack/test/dispatch/response_test.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/actionpack/test/dispatch/response_test.rb b/actionpack/test/dispatch/response_test.rb index 0b727dad3d..4c8d528507 100644 --- a/actionpack/test/dispatch/response_test.rb +++ b/actionpack/test/dispatch/response_test.rb @@ -15,13 +15,13 @@ class ResponseTest < ActiveSupport::TestCase @response.await_commit } @response.commit! - assert @response.committed? + assert_predicate @response, :committed? assert t.join(0.5) end def test_stream_close @response.stream.close - assert @response.stream.closed? + assert_predicate @response.stream, :closed? end def test_stream_write @@ -257,9 +257,9 @@ class ResponseTest < ActiveSupport::TestCase } resp.to_a - assert resp.etag? - assert resp.weak_etag? - assert_not resp.strong_etag? + assert_predicate resp, :etag? + assert_predicate resp, :weak_etag? + assert_not_predicate resp, :strong_etag? assert_equal('W/"202cb962ac59075b964b07152d234b70"', resp.etag) assert_equal({ public: true }, resp.cache_control) @@ -275,9 +275,9 @@ class ResponseTest < ActiveSupport::TestCase } resp.to_a - assert resp.etag? - assert_not resp.weak_etag? - assert resp.strong_etag? + assert_predicate resp, :etag? + assert_not_predicate resp, :weak_etag? + assert_predicate resp, :strong_etag? assert_equal('"202cb962ac59075b964b07152d234b70"', resp.etag) end @@ -356,7 +356,7 @@ class ResponseTest < ActiveSupport::TestCase end test "respond_to? accepts include_private" do - assert_not @response.respond_to?(:method_missing) + assert_not_respond_to @response, :method_missing assert @response.respond_to?(:method_missing, true) end |