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:
parent
c62efc0f0f
commit
93ae1b2b1c
|
@ -114,6 +114,7 @@ task "themes:qunit", :type, :value do |t, args|
|
||||||
MSG
|
MSG
|
||||||
end
|
end
|
||||||
ENV["THEME_#{type.upcase}"] = value.to_s
|
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"].reenable
|
||||||
Rake::Task["qunit:test"].invoke(1200000, "/theme-qunit")
|
Rake::Task["qunit:test"].invoke(1200000, "/theme-qunit")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue