Skip to content

Commit 0a63301

Browse files
committed
Fix test with Rails main
`fixture_path` was removed in Rails 7.2.
1 parent 5144677 commit 0a63301

5 files changed

+13
-4
lines changed

gemfiles/rails_7_0_propshaft.gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ DEPENDENCIES
209209
rails (~> 7.0.0)
210210
rexml
211211
selenium-webdriver
212-
sqlite3
212+
sqlite3 (~> 1.4)
213213
stimulus-rails
214214
turbo-rails
215215
webdrivers

gemfiles/rails_7_0_sprockets.gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ DEPENDENCIES
211211
rexml
212212
selenium-webdriver
213213
sprockets-rails
214-
sqlite3
214+
sqlite3 (~> 1.4)
215215
stimulus-rails
216216
turbo-rails
217217
webdrivers

gemfiles/rails_7_1_propshaft.gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ DEPENDENCIES
241241
rails (~> 7.1.0)
242242
rexml
243243
selenium-webdriver
244-
sqlite3
244+
sqlite3 (~> 1.4)
245245
stimulus-rails
246246
turbo-rails
247247
webdrivers

gemfiles/rails_7_1_sprockets.gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ DEPENDENCIES
243243
rexml
244244
selenium-webdriver
245245
sprockets-rails
246-
sqlite3
246+
sqlite3 (~> 1.4)
247247
stimulus-rails
248248
turbo-rails
249249
webdrivers

test/test_helper.rb

+9
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,18 @@
88

99

1010
# Load fixtures from the engine
11+
# Remove this when support to Rails 7.0 is dropped.
1112
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
1213
ActiveSupport::TestCase.fixture_path = File.expand_path("fixtures", __dir__)
1314
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
1415
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
1516
ActiveSupport::TestCase.fixtures :all
1617
end
18+
19+
# Load fixtures from the engine
20+
if ActiveSupport::TestCase.respond_to?(:fixture_paths=)
21+
ActiveSupport::TestCase.fixture_paths = [File.expand_path("fixtures", __dir__)]
22+
ActionDispatch::IntegrationTest.fixture_paths = ActiveSupport::TestCase.fixture_paths
23+
ActiveSupport::TestCase.file_fixture_path = File.expand_path("fixtures", __dir__) + "/files"
24+
ActiveSupport::TestCase.fixtures :all
25+
end

0 commit comments

Comments
 (0)