tasks/testing.rb in dpickett-thinking-sphinx-1.1.4 vs tasks/testing.rb in dpickett-thinking-sphinx-1.1.12

- old
+ new

@@ -18,17 +18,11 @@ namespace :features do def add_task(name, description) Cucumber::Rake::Task.new(name, description) do |t| t.cucumber_opts = "--format pretty" - t.step_pattern = [ - "features/support/env", - "features/support/db/#{name}", - "features/support/db/active_record", - "features/support/post_database", - "features/step_definitions/**.rb" - ] + t.profile = name end end add_task :mysql, "Run feature-set against MySQL" add_task :postgresql, "Run feature-set against PostgreSQL" @@ -44,17 +38,11 @@ namespace :rcov do def add_task(name, description) Cucumber::Rake::Task.new(name, description) do |t| t.cucumber_opts = "--format pretty" - t.step_pattern = [ - "features/support/env", - "features/support/db/#{name}", - "features/support/db/active_record", - "features/support/post_database", - "features/step_definitions/**.rb" - ] + t.profile = name t.rcov = true t.rcov_opts = [ '--exclude', 'spec', '--exclude', 'gems', '--exclude', 'riddle', @@ -78,9 +66,13 @@ step_definitions = FileList["features/step_definitions/**.rb"].collect { |path| "--require #{path}" }.join(" ") + features = FileList["features/*.feature"].join(" ") + File.open('cucumber.yml', 'w') { |f| - f.write "default: \"#{default_requires} #{step_definitions}\"" + f.write "default: \"#{default_requires} #{step_definitions}\"\n\n" + f.write "mysql: \"#{default_requires} #{step_definitions} #{features}\"\n\n" + f.write "postgresql: \"#{default_requires.gsub(/mysql/, 'postgresql')} #{step_definitions} #{features}\"" } end