Skip to content

Commit

Permalink
Fix deprecated TestFixtures#fixture_path call
Browse files Browse the repository at this point in the history
  • Loading branch information
nsimmons committed Apr 6, 2023
1 parent 03601af commit 3c729df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/rspec/rails/fixture_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ def run_in_transaction?
if RSpec.configuration.use_active_record?
include Fixtures

self.fixture_path = RSpec.configuration.fixture_path
# TestFixtures#fixture_path is deprecated and will be removed in Rails 7.2
if self.respond_to?(:fixture_paths=)
self.fixture_paths << RSpec.configuration.fixture_path
else
self.fixture_path = RSpec.configuration.fixture_path
end
self.use_transactional_tests = RSpec.configuration.use_transactional_fixtures
self.use_instantiated_fixtures = RSpec.configuration.use_instantiated_fixtures

Expand Down

0 comments on commit 3c729df

Please sign in to comment.