Skip to content

Commit

Permalink
Fix test with Rails main
Browse files Browse the repository at this point in the history
`fixture_path` was removed in Rails 7.2.
  • Loading branch information
rafaelfranca committed Apr 19, 2024
1 parent 5144677 commit 0a63301
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gemfiles/rails_7_0_propshaft.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ DEPENDENCIES
rails (~> 7.0.0)
rexml
selenium-webdriver
sqlite3
sqlite3 (~> 1.4)
stimulus-rails
turbo-rails
webdrivers
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7_0_sprockets.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ DEPENDENCIES
rexml
selenium-webdriver
sprockets-rails
sqlite3
sqlite3 (~> 1.4)
stimulus-rails
turbo-rails
webdrivers
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7_1_propshaft.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ DEPENDENCIES
rails (~> 7.1.0)
rexml
selenium-webdriver
sqlite3
sqlite3 (~> 1.4)
stimulus-rails
turbo-rails
webdrivers
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7_1_sprockets.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ DEPENDENCIES
rexml
selenium-webdriver
sprockets-rails
sqlite3
sqlite3 (~> 1.4)
stimulus-rails
turbo-rails
webdrivers
Expand Down
9 changes: 9 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,18 @@


# Load fixtures from the engine
# Remove this when support to Rails 7.0 is dropped.
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
ActiveSupport::TestCase.fixture_path = File.expand_path("fixtures", __dir__)
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
ActiveSupport::TestCase.fixtures :all
end

# Load fixtures from the engine
if ActiveSupport::TestCase.respond_to?(:fixture_paths=)
ActiveSupport::TestCase.fixture_paths = [File.expand_path("fixtures", __dir__)]
ActionDispatch::IntegrationTest.fixture_paths = ActiveSupport::TestCase.fixture_paths
ActiveSupport::TestCase.file_fixture_path = File.expand_path("fixtures", __dir__) + "/files"
ActiveSupport::TestCase.fixtures :all
end

0 comments on commit 0a63301

Please sign in to comment.