Created
April 11, 2017 22:46
-
-
Save richdownie/5228ee508600dca5d140f7e0591dc8d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
namespace :cuke do | |
desc "run cuke builds by cuke tag" | |
task :hub, [:tag] do |t, args| | |
file = "#{args[:tag]}".gsub(/@/, '') | |
Bundler.with_clean_env do | |
console_output = "" | |
IO.popen("cucumber -t #{args[:tag]} -f rerun --out #{file}.txt", 'r+') do |pipe| | |
puts console_output = pipe.read | |
pipe.close_write | |
end | |
IO.popen("cucumber #{args[:tag]}.txt --format html --out=#{file}.html --format pretty", 'r+') do |pipe| | |
puts "** RE-RUNNING FAILED #{args[:tags]}.txt SCENARIOS **" | |
puts console_output = pipe.read | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment