09 May 2012, 12:32
Generic-user-small

Rajneesh Namta (1 post)

Hi,

I am newbie to cucumber and while going through chapter 2, I am getting the error while running code\first_taste\07\features\step_definitions\calculator_steps.rb

I downloaded the code snippets from the site and the same error is still there.

..F

(::) failed steps (::)

undefined method should' for "":String (NoMethodError) ./features/step_definitions/calculator_steps.rb:11:in (root)’:in /^the output should be "([^"]*)"$/' features\adding.feature:6:in Then the output should be “4”’

Failing Scenarios: cucumber features\adding.feature:3 # Scenario: Add two numbers

1 scenario (1 failed) 3 steps (1 failed, 2 passed)

Any clue as to what I am doing wrong here ?

15 May 2012, 07:57
Avatar_pragsmall

Matt Wynne (87 posts)

It sounds as if you don’t have the rspec gem installed. Did you follow the installation instructions in the appendix?

07 Feb 2013, 20:25
Generic-user-small

David West (3 posts)

Thanks, Matt. That helped me.

02 Oct 2013, 18:02
Generic-user-small

Evan Hamlin (1 post)

@Matt Wynne: I was having the exact same problem and just needed to “gem install rspec”.

Thank you!

22 Dec 2013, 21:53
Jw_pragsmall

John Wood (1 post)

Thanks, Evan!
1. I’m just getting to know Cucumber and was getting the same error.
2. It appears that the “gem install rspec” command installed 4 gems, in my case, at C:\Ruby200\lib\ruby\gems\2.0.0\gems.
3. This path appears to be a good place to figure out what other gems (and version #s) are installed.

31 Jul 2014, 08:32
Generic-user-small

Hasnain Mamdani (1 post)

Hello, I installed rspec but still getting this error. I actually downloaded Ruby and Iron Ruby both. Tried installing using both igem install and gem install. Is there any way I could understand why I’m still getting the error? Thanks, Hasnain

  You must be logged in to comment