0

My cucumber feature file is using scenario outline like below:

Scenario Outline: 
  And user searches for item "<item>"
  Then homepage is active
  And user selects "<type>" Type(s)

Examples:
  | item | type |
  | car | bmw   |
  | car | honda  |

Throws this below error message on :

undefined method `steps' for #<Cucumber::Ast::OutlineTable::ExampleRow:0x007f83buyg71120> 
(NoMethodError)

I am using cucumber 1.3.19 and in my env.rb file before hook, i am using below where the error is thrown from:

scenario.steps.map(&:name)
ASM
  • 709
  • 2
  • 8
  • 27
  • Could you post all of the code from your before hook in your env.rb? You likely want to call `scenario.test_steps.map(&:name)`; but `scenario` in the case that I tested was `Cucumber::RunningTestCase::ScenarioOutlineExample` (using the `Before do |scenario|` [scenario hook](https://github.com/cucumber/cucumber/wiki/Hooks#scenario-hooks)), not `Cucumber::Ast::OutlineTable::ExampleRow` from your error. – konacaret Mar 29 '16 at 02:17

1 Answers1

0

I have fixed this issue by upgrading my cucumber version to 2.0.2

ASM
  • 709
  • 2
  • 8
  • 27