Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
env.cache = ActiveSupport::Cache.lookup_store(:memory_store)
end

config.assets.compile = ENV['TEST_SUITE'] == 'spec:javascript'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, if we keep this logic, it will have to also add the spec and api test suites since they would also need to precompile their assets instead of live compile them.

It feels like live compilation is less intrusive.

config.assets.compile = true

# Log error messages when you accidentally call methods on nil
config.whiny_nils = true
Expand Down Expand Up @@ -66,3 +66,10 @@
require "vcr"
require "webmock/rspec"
require "capybara"

module AssumeAssetPrecompiledInTest
def asset_precompiled?(_logical_path)
true
end
end
Vmdb::Application.prepend(AssumeAssetPrecompiledInTest)