From 93ae1b2b1ce866fe645552a316cbec7bb301fff6 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 24 May 2021 13:35:10 +0100 Subject: [PATCH] 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. --- lib/tasks/themes.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/themes.rake b/lib/tasks/themes.rake index 83c1038a855..f11a628bec5 100644 --- a/lib/tasks/themes.rake +++ b/lib/tasks/themes.rake @@ -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