mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Merge pull request #4268 from choiceaustralia/qunit-args
enable args MODULE and FILTER for qunit:test rake task
This commit is contained in:
commit
ad15c4ac78
1 changed files with 10 additions and 0 deletions
|
@ -37,6 +37,16 @@ task "qunit:test" => :environment do
|
||||||
test_path = "#{Rails.root}/vendor/assets/javascripts"
|
test_path = "#{Rails.root}/vendor/assets/javascripts"
|
||||||
cmd = "phantomjs #{test_path}/run-qunit.js http://localhost:#{port}/qunit"
|
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
|
# wait for server to respond, will exception out on failure
|
||||||
tries = 0
|
tries = 0
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in a new issue