Merge pull request #25625 from voxik/fix-rails-test-git-layout
Do not depend on Rails git repository layout in ActiveSupport tests.
This commit is contained in:
commit
14996a1490
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user