From d2bd857160b27877aba237a16751b409b6efc4ef Mon Sep 17 00:00:00 2001 From: Rimian Perkins Date: Tue, 14 Jun 2016 12:06:11 +1000 Subject: [PATCH] enable args MODULE and FILTER for qunit:test rake task --- lib/tasks/qunit.rake | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/tasks/qunit.rake b/lib/tasks/qunit.rake index 061ae69ff..07e9a48b6 100644 --- a/lib/tasks/qunit.rake +++ b/lib/tasks/qunit.rake @@ -37,6 +37,16 @@ task "qunit:test" => :environment do test_path = "#{Rails.root}/vendor/assets/javascripts" cmd = "phantomjs #{test_path}/run-qunit.js http://localhost:#{port}/qunit" + options = {} + + %w{module filter}.each do |arg| + options[arg] = ENV[arg.upcase] if ENV[arg.upcase].present? + end + + if options.present? + cmd += "?#{options.to_query.gsub('+', '%20')}" + end + # wait for server to respond, will exception out on failure tries = 0 begin