Skip to content

Commit

Permalink
Restructured cucumber.
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Feb 14, 2011
1 parent bdc4d9c commit a4df8b1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions core/lib/generators/templates/config/cucumber.yml
@@ -1,16 +1,11 @@
<%
ENV["RAILS_ENV"] ||= "test"
# For some reason we're relative to the Rails.root at this point
require ::File.expand_path('../config/environment', __FILE__)
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} --strict --tags ~@wip "
features_globs = []
(::Refinery::Plugins.registered.pathnames << Rails.root).map{|p| p.join('features')}.reject{|d| !d.directory?}.each do |features|
features_globs << Dir[features.to_s].flatten.join(' ')
end
std_opts << features_globs.join(' ')
refinery_features = (::Refinery::Plugins.registered.pathnames << Rails.root).map{|p| p.join('features')}.reject{|d| !d.directory?}
%>
default: <%= std_opts %>
default: <%= std_opts %> <%= refinery_features.join(' ') %>
wip: --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip

0 comments on commit a4df8b1

Please sign in to comment.