From ca8e4dfb438b9fe2185297eeb04f665d5bbd480f Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Tue, 19 Dec 2017 21:35:51 +0800 Subject: [PATCH] Allow seed to be passed via ENV. --- lib/tasks/qunit.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/qunit.rake b/lib/tasks/qunit.rake index 8edff93f8ec..13ff929deca 100644 --- a/lib/tasks/qunit.rake +++ b/lib/tasks/qunit.rake @@ -47,7 +47,7 @@ task "qunit:test", [:timeout, :qunit_path] => :environment do |_, args| test_path = "#{Rails.root}/vendor/assets/javascripts" qunit_path = args[:qunit_path] || "/qunit" cmd = "node #{test_path}/run-qunit.js http://localhost:#{port}#{qunit_path}" - options = { seed: Random.new.seed } + options = { seed: (ENV["SEED"] || Random.new.seed) } %w{module filter qunit_skip_core qunit_single_plugin}.each do |arg| options[arg] = ENV[arg.upcase] if ENV[arg.upcase].present?