diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-05-07 20:16:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-07 20:16:42 +0200 |
commit | 45095a817b29f3b4956abce5d059410d591b902a (patch) | |
tree | 5bf7fc2271ddc5d4ed511db35893c2049142831b /activesupport | |
parent | af58740b8d943f90a18c3e7ceca9432775cfe192 (diff) | |
parent | b201474756a2ee493406ad0cb49f49c6873bdc28 (diff) | |
download | rails-45095a817b29f3b4956abce5d059410d591b902a.tar.gz rails-45095a817b29f3b4956abce5d059410d591b902a.tar.bz2 rails-45095a817b29f3b4956abce5d059410d591b902a.zip |
Merge pull request #29005 from kamipo/should_escape_meta_chars_in_regexp
Should escape meta characters in regexp
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/test/testing/file_fixtures_test.rb | 4 | ||||
-rw-r--r-- | activesupport/test/time_travel_test.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/test/testing/file_fixtures_test.rb b/activesupport/test/testing/file_fixtures_test.rb index e44fe58ce9..faa81b5e75 100644 --- a/activesupport/test/testing/file_fixtures_test.rb +++ b/activesupport/test/testing/file_fixtures_test.rb @@ -8,7 +8,7 @@ class FileFixturesTest < ActiveSupport::TestCase test "#file_fixture returns Pathname to file fixture" do path = file_fixture("sample.txt") assert_kind_of Pathname, path - assert_match %r{.*/test/file_fixtures/sample.txt$}, path.to_s + assert_match %r{.*/test/file_fixtures/sample\.txt$}, path.to_s end test "raises an exception when the fixture file does not exist" do @@ -25,6 +25,6 @@ class FileFixturesPathnameDirectoryTest < ActiveSupport::TestCase test "#file_fixture_path returns Pathname to file fixture" do path = file_fixture("sample.txt") assert_kind_of Pathname, path - assert_match %r{.*/test/file_fixtures/sample.txt$}, path.to_s + assert_match %r{.*/test/file_fixtures/sample\.txt$}, path.to_s end end diff --git a/activesupport/test/time_travel_test.rb b/activesupport/test/time_travel_test.rb index e0d3fb0cf5..9d354f14f4 100644 --- a/activesupport/test/time_travel_test.rb +++ b/activesupport/test/time_travel_test.rb @@ -99,7 +99,7 @@ class TimeTravelTest < ActiveSupport::TestCase #noop end end - assert_match(/Calling `travel_to` with a block, when we have previously already made a call to `travel_to`, can lead to confusing time stubbing./, e.message) + assert_match(/Calling `travel_to` with a block, when we have previously already made a call to `travel_to`, can lead to confusing time stubbing\./, e.message) end end end |