diff --git a/CHANGELOG.md b/CHANGELOG.md index e7b2ae2a..2d628893 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ ## [In git](https://github.com/strongqa/howitzer/compare/v2.1.0...master) ### New Features - +- Cucumber rake tasks minor updates ### Bug-fixes - +- [#246](https://github.com/strongqa/howitzer/issues/246) Options fixed for rspec rake tasks ## [v2.1.0](https://github.com/strongqa/howitzer/compare/v2.0.3...v2.1.0) ### New Features diff --git a/generators/cucumber/templates/cucumber.rake b/generators/cucumber/templates/cucumber.rake index 9ae7859e..f47c01b8 100644 --- a/generators/cucumber/templates/cucumber.rake +++ b/generators/cucumber/templates/cucumber.rake @@ -19,7 +19,7 @@ end Cucumber::Rake::Task.new(:features, 'Run all workable scenarios (without @wip and @bug tags)') do |t| Howitzer.current_rake_task = t.instance_variable_get :@task_name - t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} --tags ~@wip --tags ~@bug" + t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} --tags 'not @wip and not @bug'" end namespace :features do @@ -35,23 +35,23 @@ namespace :features do Cucumber::Rake::Task.new(:smoke, 'Run workable smoke scenarios (with @smoke tag)') do |t| Howitzer.current_rake_task = t.instance_variable_get :@task_name - t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} --tags @smoke --tags ~@wip --tags ~@bug" + t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} --tags '@smoke and not @wip and not @bug'" end Cucumber::Rake::Task.new(:bvt, 'Run workable build verification test scenarios') do |t| Howitzer.current_rake_task = t.instance_variable_get :@task_name t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} - --tags ~@wip --tags ~@bug --tags ~@smoke --tags ~@p1 --tags ~@p2" + --tags 'not @wip and not @bug and not @smoke and not @p1 and not @p2'" end Cucumber::Rake::Task.new(:p1, 'Run workable scenarios with normal priority (with @p1 tag)') do |t| Howitzer.current_rake_task = t.instance_variable_get :@task_name - t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} --tags ~@wip --tags ~@bug --tags @p1" + t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} --tags 'not @wip and not @bug and @p1'" end Cucumber::Rake::Task.new(:p2, 'Run workable scenarios with low priority (with @p2 tag)') do |t| Howitzer.current_rake_task = t.instance_variable_get :@task_name - t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} --tags ~@wip --tags ~@bug --tags @p2" + t.cucumber_opts = "#{opts.call(t.instance_variable_get(:@task_name))} --tags 'not @wip and not @bug and @p2'" end end diff --git a/generators/rspec/templates/rspec.rake b/generators/rspec/templates/rspec.rake index cc56e463..0e2b2fcc 100644 --- a/generators/rspec/templates/rspec.rake +++ b/generators/rspec/templates/rspec.rake @@ -10,43 +10,43 @@ end RSpec::Core::RakeTask.new(:rspec, 'Run all rspec scenarios') do |t| Howitzer.current_rake_task = t.name - t.opts = opts.call(t.name) + t.rspec_opts = opts.call(t.name) end RSpec::Core::RakeTask.new(:features, 'Run all workable scenarios (without @wip and @bug tags)') do |t| Howitzer.current_rake_task = t.name - t.opts = "#{opts.call(t.name)} --tag ~wip --tag ~bug" + t.rspec_opts = "#{opts.call(t.name)} --tag ~wip --tag ~bug" end namespace :features do RSpec::Core::RakeTask.new(:wip, 'Run scenarios in progress (with @wip tag)') do |t| Howitzer.current_rake_task = t.name - t.opts = "#{opts.call(t.name)} --tag wip" + t.rspec_opts = "#{opts.call(t.name)} --tag wip" end RSpec::Core::RakeTask.new(:bug, 'Run scenarios with known bugs (with @bug tag)') do |t| Howitzer.current_rake_task = t.name - t.opts = "#{opts.call(t.name)} --tag bug" + t.rspec_opts = "#{opts.call(t.name)} --tag bug" end RSpec::Core::RakeTask.new(:smoke, 'Run workable smoke scenarios (with @smoke tag)') do |t| Howitzer.current_rake_task = t.name - t.opts = "#{opts.call(t.name)} --tag smoke --tag ~wip --tag ~bug" + t.rspec_opts = "#{opts.call(t.name)} --tag smoke --tag ~wip --tag ~bug" end RSpec::Core::RakeTask.new(:bvt, 'Run workable build verification test scenarios') do |t| Howitzer.current_rake_task = t.name - t.opts = "#{opts.call(t.name)} --tag ~wip --tag ~bug --tag ~p1 --tag ~p2 --tag ~smoke" + t.rspec_opts = "#{opts.call(t.name)} --tag ~wip --tag ~bug --tag ~p1 --tag ~p2 --tag ~smoke" end RSpec::Core::RakeTask.new(:p1, 'Run workable scenarios with normal priority (with @p1 tag)') do |t| Howitzer.current_rake_task = t.name - t.opts = "#{opts.call(t.name)} --tag p1 --tag ~wip --tag ~bug" + t.rspec_opts = "#{opts.call(t.name)} --tag p1 --tag ~wip --tag ~bug" end RSpec::Core::RakeTask.new(:p2, 'Run workable scenarios with low priority (with @p2 tag)') do |t| Howitzer.current_rake_task = t.name - t.opts = "#{opts.call(t.name)} --tag p2 --tag ~wip --tag ~bug" + t.rspec_opts = "#{opts.call(t.name)} --tag p2 --tag ~wip --tag ~bug" end end