aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2019-07-27 12:49:45 +0900
committerAkira Matsuda <ronnie@dio.jp>2019-07-27 13:06:49 +0900
commite9651deea4145f62224af56af027bfbb3e45e4cd (patch)
treee47775d49628bb9247ca6169cc78eca87100d0e3 /actionpack
parent6f35244defbb410373a9ffca8468ab482800ffd9 (diff)
downloadrails-e9651deea4145f62224af56af027bfbb3e45e4cd.tar.gz
rails-e9651deea4145f62224af56af027bfbb3e45e4cd.tar.bz2
rails-e9651deea4145f62224af56af027bfbb3e45e4cd.zip
Use assert_match / assert_no_match for asserting match
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 50f6c06fee..da417a1604 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 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"
+ 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"
end
test "can be initialized with wildcards" do