Last active
November 21, 2022 16:13
-
-
Save ghiculescu/3e7a1f40cdae0617e7530027ce876f12 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined?(ActiveRecord::Base) | |
begin | |
ActiveRecord::Migration.maintain_test_schema! | |
rescue ActiveRecord::PendingMigrationError => e | |
puts e.to_s.strip | |
exit 1 | |
end | |
end | |
ActiveSupport.on_load(:active_support_test_case) do | |
if defined?(ActiveRecord::Base) | |
include ActiveRecord::TestDatabases | |
include ActiveRecord::TestFixtures | |
end | |
self.fixture_path = "#{Rails.root}/test/fixtures/" | |
self.file_fixture_path = fixture_path + "files" | |
end | |
ActiveSupport.on_load(:action_dispatch_integration_test) do | |
self.fixture_path = ActiveSupport::TestCase.fixture_path | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment