提交 14996a14 编写于 作者: R Rafael França 提交者: GitHub

Merge pull request #25625 from voxik/fix-rails-test-git-layout

Do not depend on Rails git repository layout in ActiveSupport tests.
......@@ -6,7 +6,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{activesupport/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
......@@ -23,6 +23,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{activesupport/test/file_fixtures/sample.txt$}, path.to_s
assert_match %r{.*/test/file_fixtures/sample.txt$}, path.to_s
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册