Sha256: 77b0ac611641989c0f9c21179bf9c409d1ca8fb6466aaa8044ce2d84c2212b34
Contents?: true
Size: 954 Bytes
Versions: 2
Compression:
Stored size: 954 Bytes
Contents
# coding: UTF-8 require 'rake' unless defined?(Rails) task :environment do; end end namespace :dad do task :cucumber => ['environment', 'db:test:prepare'] do |t, args| format = ENV['FORMAT'] || 'Daddy::Formatter::Html' options = [ "DRIVER=" + (ENV['DRIVER'] || 'selenium'), "PAUSE=" + (ENV['PAUSE'] || '0'), "COVERAGE=" + (ENV['COVERAGE'] || 'true'), "EXPAND=" + (ENV['EXPAND'] || 'true') ].join(' ') features = [] ARGV[1..-1].each do |arg| unless arg.index('=') task arg.to_sym do ; end features << arg.gsub(/:/, '\:') end end output = "features/reports/index.html" output = "features/reports" if format == 'junit' command = "bundle exec cucumber --guess --quiet --no-multiline -r features --format pretty --format #{format} --out #{output} #{features.join(' ')} #{options}" #puts command ret = system(command) fail unless ret end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
daddy-0.1.15 | lib/tasks/cucumber.rake |
daddy-0.1.14 | lib/tasks/cucumber.rake |