Sha256: 278f0760d5c3c11473636b62e2e04a438ee0d4670a7f7d3905a999c4400d2e5f
Contents?: true
Size: 965 Bytes
Versions: 9
Compression:
Stored size: 965 Bytes
Contents
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'] || 'poltergeist'), 'PAUSE=' + (ENV['PAUSE'] || '0'), 'COVERAGE=' + (ENV['COVERAGE'] || 'true'), 'ACCEPTANCE_TEST=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 = "test/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
9 entries across 9 versions & 1 rubygems