Skip to content

Commit

Permalink
chore: use Rails load_defaults for test runs (#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjankowski committed Jul 16, 2024
1 parent 6b56061 commit a764196
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion test/mounted_app/test/dummy/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

module TestDummyApp
class Application < Rails::Application
config.secret_key_base = 'abcdef'
config.load_defaults Rails::VERSION::STRING.to_f
config.secret_key_base = SecureRandom.hex
config.eager_load = true
end
end
8 changes: 7 additions & 1 deletion test/test_app/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ class Rails::Console; end

module TestApp
class Application < ::Rails::Application
config.secret_key_base = 'abcdef'
config.load_defaults Rails::VERSION::STRING.to_f
config.secret_key_base = SecureRandom.hex
config.eager_load = true
config.active_support.test_order = :sorted

if Rails.gem_version >= Gem::Version.new('7.0.0')
# Option added in Rails 7.0, defaults to false. Some helper_test tests assume true.
config.action_view.apply_stylesheet_media_default = true
end
end
end

0 comments on commit a764196

Please sign in to comment.