Skip to content

Commit

Permalink
Explain fixture_paths=
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuravel committed Aug 12, 2024
1 parent 1380d42 commit 135be7f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,17 @@
module ActiveSupport
class TestCase
include ActiveRecord::TestFixtures

# `fixture_path=` was deprecated in favor of
# `fixture_paths=` in Rails 7.1, removed in Rails 7.2.
if respond_to?(:fixture_paths=)
self.fixture_paths = [File.dirname(__FILE__) + "/fixtures"]
else
self.fixture_path = File.dirname(__FILE__) + "/fixtures"
end

# use_transactional_fixtures= is deprecated and will be removed from Rails 5.1
# (use use_transactional_tests= instead)
# `use_transactional_fixtures=` was deprecated in favor of
# `use_transactional_tests=` in Rails 5.0, removed in Rails 5.1.
if respond_to?(:use_transactional_tests=)
self.use_transactional_tests = false
else
Expand Down

0 comments on commit 135be7f

Please sign in to comment.