Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tags on scenario outline #252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions examples/tags.feature
Expand Up @@ -12,3 +12,15 @@ Feature: With tags
When I attack it
And I attack it
Then it should die

@variety
Scenario Outline: With tag on scenario outline
Given there is a <Monster Type> monster
When I attack it
And I attack it
Then it should die

Examples:
| Monster Type |
| weak |
| strong |
1 change: 1 addition & 0 deletions lib/turnip/node/scenario_outline.rb
Expand Up @@ -125,6 +125,7 @@ def convert_metadata_to_scenario(header, row)
scenario.steps = original.steps
scenario.source_line = original.source_line
scenario.source_column = original.source_column
scenario.tags = original.tags
end
end

Expand Down
2 changes: 2 additions & 0 deletions spec/builder_spec.rb
Expand Up @@ -48,6 +48,8 @@
expect(feature.tags[0]).to be_instance_of Turnip::Node::Tag
expect(feature.scenarios[0].tags[0].name).to eq 'cool'
expect(feature.scenarios[1].tag_names).to eq ['stealthy', 'wicked']
expect(feature.scenarios[2].tag_names).to eq ['variety']
expect(feature.scenarios[3].tag_names).to eq ['variety']
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/integration_spec.rb
Expand Up @@ -12,7 +12,7 @@
end

it "prints out failures and successes" do
@result.should include('46 examples, 4 failures, 6 pending')
@result.should include('48 examples, 4 failures, 7 pending')
end

it "includes features in backtraces" do
Expand Down