diff --git a/HISTORY.md b/HISTORY.md index 7df42a48..091f960f 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,9 +1,10 @@ ## [In Git](https://github.com/cucumber/cucumber-ruby-core/compare/v1.1.1...master) -* Your change here? +### New Features + + * Make Test Case names for Scenario Outlines language neutral [83](https://github.com/cucumber/cucumber-ruby-core/pull/83) (@brasmusson) -## -[v1.1.1](https://github.com/cucumber/cucumber-ruby-core/compare/v1.1.1...v1.1.1) +## [v1.1.1](https://github.com/cucumber/cucumber-ruby-core/compare/v1.1.0...v1.1.1) ### New Features diff --git a/lib/cucumber/core/test/case.rb b/lib/cucumber/core/test/case.rb index 5a1d4581..0f45d741 100644 --- a/lib/cucumber/core/test/case.rb +++ b/lib/cucumber/core/test/case.rb @@ -125,7 +125,7 @@ def examples_table(table) end def examples_table_row(row) - @result = " (row #{row.number})" + @result = " (##{row.number})" self end end diff --git a/spec/cucumber/core/test/case_spec.rb b/spec/cucumber/core/test/case_spec.rb index ebe4ccfc..a6b98dfe 100644 --- a/spec/cucumber/core/test/case_spec.rb +++ b/spec/cucumber/core/test/case_spec.rb @@ -97,14 +97,14 @@ module Test end receiver = double.as_null_object expect( receiver ).to receive(:test_case) do |test_case| - expect( test_case.name ).to eq 'outline name, examples name (row 1)' + expect( test_case.name ).to eq 'outline name, examples name (#1)' expect( test_case.keyword ).to eq 'Scenario Outline' end.once.ordered expect( receiver ).to receive(:test_case) do |test_case| - expect( test_case.name ).to eq 'outline name, examples name (row 2)' + expect( test_case.name ).to eq 'outline name, examples name (#2)' end.once.ordered expect( receiver ).to receive(:test_case) do |test_case| - expect( test_case.name ).to eq 'outline name, Examples (row 1)' + expect( test_case.name ).to eq 'outline name, Examples (#1)' end.once.ordered compile [gherkin], receiver end @@ -378,7 +378,7 @@ module Test end let(:test_case) do - test_cases.find { |c| c.name == "two, x1 (row 1)" } + test_cases.find { |c| c.name == "two, x1 (#1)" } end it 'matches the precise location of the scenario outline examples table row' do diff --git a/spec/cucumber/core_spec.rb b/spec/cucumber/core_spec.rb index 30bbbbf0..710090f4 100644 --- a/spec/cucumber/core_spec.rb +++ b/spec/cucumber/core_spec.rb @@ -48,7 +48,7 @@ module Cucumber it "filters out test cases based on a tag expression" do visitor = double.as_null_object expect( visitor ).to receive(:test_case) do |test_case| - expect( test_case.name ).to eq 'foo, bar (row 1)' + expect( test_case.name ).to eq 'foo, bar (#1)' end.exactly(1).times gherkin = gherkin do