Skip to content

Commit

Permalink
Fix Rails 7.2 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Aug 29, 2024
1 parent af69335 commit 82c71e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/config_rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
load Rails.root.join('db', 'schema.rb').to_s

# Set our fixtures path
config.fixture_path = File.expand_path('fixtures', __dir__)
if Rails.version >= '7.2'
config.fixture_paths = File.expand_path('fixtures', __dir__)
else
config.fixture_path = File.expand_path('fixtures', __dir__)
end

# Run tests in random order
config.order = :random
Expand Down
6 changes: 6 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@
# Load our own config
require_relative 'config_capybara'
require_relative 'config_rspec'

if Rails.version >= '7.2'
def fixture_path
fixture_paths
end
end

0 comments on commit 82c71e1

Please sign in to comment.