aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2019-07-29 14:05:51 +0900
committerAkira Matsuda <ronnie@dio.jp>2019-07-29 14:17:36 +0900
commit26edd1d1128f26c63e673bd7f7ccf8ef73e5b069 (patch)
tree803a5345c52f034b2c6797aba5e41a74f31af6b3 /actionpack
parent8f90ac7827787a84b38055e1011ef9aedd89fe91 (diff)
downloadrails-26edd1d1128f26c63e673bd7f7ccf8ef73e5b069.tar.gz
rails-26edd1d1128f26c63e673bd7f7ccf8ef73e5b069.tar.bz2
rails-26edd1d1128f26c63e673bd7f7ccf8ef73e5b069.zip
Revert "Use assert_match / assert_no_match for asserting match"
This reverts commit e9651deea4145f62224af56af027bfbb3e45e4cd. Now we're having both `=~` and `match?` for these objects, and it's nicer to have explicit tests for both of them
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/test/dispatch/mime_type_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/test/dispatch/mime_type_test.rb b/actionpack/test/dispatch/mime_type_test.rb
index a8bc2f0e64..b0b2aa0cc1 100644
--- a/actionpack/test/dispatch/mime_type_test.rb
+++ b/actionpack/test/dispatch/mime_type_test.rb
@@ -167,12 +167,12 @@ class MimeTypeTest < ActiveSupport::TestCase
end
test "regexp matcher" do
- assert_match Mime[:js], "text/javascript"
- assert_match Mime[:js], "application/javascript"
- assert_no_match Mime[:js], "text/html"
- assert_match Mime[:js], "text/javascript"
- assert_match Mime[:js], "application/javascript"
- assert_match Mime[:html], "application/xhtml+xml"
+ assert Mime[:js] =~ "text/javascript"
+ assert Mime[:js] =~ "application/javascript"
+ assert Mime[:js] !~ "text/html"
+ assert_not (Mime[:js] !~ "text/javascript")
+ assert_not (Mime[:js] !~ "application/javascript")
+ assert Mime[:html] =~ "application/xhtml+xml"
end
test "match?" do