Skip to content

Commit

Permalink
Merge d581fd6 into fbcc5ec
Browse files Browse the repository at this point in the history
  • Loading branch information
timdiggins committed Mar 31, 2021
2 parents fbcc5ec + d581fd6 commit 478fe4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions spec/dummy/config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true

# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
if ENV["CI"] || ENV["TEST_EAGER_LOAD"]
config.eager_load = true
else
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false
end

# Configure public file server for tests with Cache-Control for performance.
if config.respond_to?(:public_file_server)
Expand Down
2 changes: 1 addition & 1 deletion spec/trestle/resource/builder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
expect(Trestle::ResourceController).not_to be(Trestle::AdminController)

ActiveSupport::Dependencies.mechanism = :require
end unless Rails.configuration.try(:autoloader) == :zeitwerk
end unless (Rails.application.config.eager_load || Rails.configuration.try(:autoloader) == :zeitwerk)

describe "#table" do
it "builds an index table with the admin and sortable options set" do
Expand Down

0 comments on commit 478fe4d

Please sign in to comment.