more profile fun
This commit is contained in:
parent
a7a1e06597
commit
6162f97900
|
@ -1,8 +1,14 @@
|
||||||
module CukePack
|
module CukePack
|
||||||
class Profiles
|
class Profiles
|
||||||
def self.write
|
def self.std_opts
|
||||||
std_opts = "-r features --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} -f Cucumber::StepWriter --out features/step_definitions --strict"
|
"-r features --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} -f Cucumber::StepWriter --out features/step_definitions --strict"
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.std_wip_opts
|
||||||
|
%{#{std_opts} --tags @wip}
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.write
|
||||||
in_progress_file = 'in_progress.txt'
|
in_progress_file = 'in_progress.txt'
|
||||||
rerun_file = 'rerun.txt'
|
rerun_file = 'rerun.txt'
|
||||||
|
|
||||||
|
@ -15,14 +21,12 @@ module CukePack
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
standard_wip_opts = %{#{std_opts} --tags @wip}
|
|
||||||
|
|
||||||
if in_progress
|
if in_progress
|
||||||
File.open(rerun_file, 'wb') { |fh| fh.print in_progress }
|
File.open(rerun_file, 'wb') { |fh| fh.print in_progress }
|
||||||
|
|
||||||
wip_opts = %{RERUN_FILE=#{rerun_file} RUN_INPROGRESS=#{in_progress_file} #{std_opts} @#{rerun_file}}
|
wip_opts = %{RERUN_FILE=#{rerun_file} RUN_INPROGRESS=#{in_progress_file} #{std_opts} @#{rerun_file}}
|
||||||
else
|
else
|
||||||
wip_opts = %{#{standard_wip_opts} features}
|
wip_opts = %{#{std_wip_opts} features}
|
||||||
end
|
end
|
||||||
|
|
||||||
headless_driver = ENV['DRIVER'] || 'poltergeist'
|
headless_driver = ENV['DRIVER'] || 'poltergeist'
|
||||||
|
|
Loading…
Reference in New Issue