mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #21043 from y-yagi/loading_fixtures_in_engine_integration_tests
set the correct path to `ActionDispatch::IntegrationTest.fixture_path`
This commit is contained in:
commit
ce1bd47698
2 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,7 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
||||||
# Load fixtures from the engine
|
# Load fixtures from the engine
|
||||||
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
||||||
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
||||||
|
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
||||||
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
|
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
|
||||||
ActiveSupport::TestCase.fixtures :all
|
ActiveSupport::TestCase.fixtures :all
|
||||||
end
|
end
|
||||||
|
|
|
@ -313,6 +313,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
|
||||||
assert_file "test/test_helper.rb" do |content|
|
assert_file "test/test_helper.rb" do |content|
|
||||||
assert_match(/ActiveRecord::Migrator\.migrations_paths.+\.\.\/test\/dummy\/db\/migrate/, content)
|
assert_match(/ActiveRecord::Migrator\.migrations_paths.+\.\.\/test\/dummy\/db\/migrate/, content)
|
||||||
assert_match(/ActiveRecord::Migrator\.migrations_paths.+<<.+\.\.\/db\/migrate/, content)
|
assert_match(/ActiveRecord::Migrator\.migrations_paths.+<<.+\.\.\/db\/migrate/, content)
|
||||||
|
assert_match(/ActionDispatch::IntegrationTest\.fixture_path = ActiveSupport::TestCase\.fixture_pat/, content)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue