Skip to content

Commit

Permalink
Merge 984e189 into a017e77
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-voronenko committed Nov 20, 2017
2 parents a017e77 + 984e189 commit c72f16c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions 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
Expand Down
10 changes: 5 additions & 5 deletions generators/cucumber/templates/cucumber.rake
Expand Up @@ -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
Expand All @@ -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

Expand Down
16 changes: 8 additions & 8 deletions generators/rspec/templates/rspec.rake
Expand Up @@ -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

Expand Down

0 comments on commit c72f16c

Please sign in to comment.