Created
April 11, 2017 23:12
-
-
Save richdownie/6e5d78d9eded4adaf423312b1e98f59e 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| | |
console_output = pipe.read | |
pipe.close_write | |
end | |
IO.popen("cucumber #{args[:tag]}.txt", 'r+') do |pipe| | |
puts "** RE-RUNNING FAILED 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