mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Default to development RAILS_ENV when running theme tests (#13106)
When testing theme components in development, it doesn't make sense to use the `test` environment. The `test` environment almost certainly has 0 themes installed. This change still works fine when using the `themes:install_and_test` rake task, because that rake task explicitly specifies environment/database-config.
This commit is contained in:
@@ -114,6 +114,7 @@ task "themes:qunit", :type, :value do |t, args|
|
||||
MSG
|
||||
end
|
||||
ENV["THEME_#{type.upcase}"] = value.to_s
|
||||
ENV["QUNIT_RAILS_ENV"] ||= 'development' # qunit:test will switch to `test` by default
|
||||
Rake::Task["qunit:test"].reenable
|
||||
Rake::Task["qunit:test"].invoke(1200000, "/theme-qunit")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user