aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/testing
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2017-05-07 04:08:58 +0900
committerRyuta Kamizono <kamipo@gmail.com>2017-05-07 04:10:00 +0900
commitb201474756a2ee493406ad0cb49f49c6873bdc28 (patch)
tree5bf7fc2271ddc5d4ed511db35893c2049142831b /activesupport/test/testing
parentaf58740b8d943f90a18c3e7ceca9432775cfe192 (diff)
downloadrails-b201474756a2ee493406ad0cb49f49c6873bdc28.tar.gz
rails-b201474756a2ee493406ad0cb49f49c6873bdc28.tar.bz2
rails-b201474756a2ee493406ad0cb49f49c6873bdc28.zip
Should escape meta characters in regexp
Diffstat (limited to 'activesupport/test/testing')
-rw-r--r--activesupport/test/testing/file_fixtures_test.rb4
1 files changed, 2 insertions, 2 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