small medium large xlarge

Photo on 2009-10-01 at 13.52_pragsmall
05 Dec 2011, 01:53
Don Fox (4 posts)

While following the scenario on my machine events go along as expected until I get to load calc.rb with content in section 2.8. At this point when I run cucumber I get no change from the previous run? calc.rb is in the calculator dir.

c-98-240-69-159:calculator donfox1$ cucumber Feature: Adding

Scenario: Add two numbers # features/adding.feature:3 Given the input “2+2” # features/step_definitons/calculator_steps.rb:9 When the calculator is run # features/step_definitons/calculator_steps.rb:13 Then the output should be “4” # features/step_definitons/calculator_steps.rb:18 undefined method should' for "4":String (NoMethodError) ./features/step_definitons/calculator_steps.rb:19: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) 0m0.009s c-98-240-69-159:calculator donfox1$ ls calc.rb features

In the previous step I get an error about “undefined method ‘should’ “

cucumber Feature: Adding

Scenario: Add two numbers # features/adding.feature:3 Given the input “2+2” # features/step_definitons/calculator_steps.rb:9 When the calculator is run # features/step_definitons/calculator_steps.rb:13 Then the output should be “4” # features/step_definitons/calculator_steps.rb:18 undefined method should' for "4":String (NoMethodError) ./features/step_definitons/calculator_steps.rb:19: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) 0m0.009s

Avatar_pragsmall
05 Dec 2011, 10:46
Matt Wynne (87 posts)

Hi Don,

You’re getting this problem because you don’t have the RSpec gem installed.

Did you follow the installation instructions in the appendix? Particularly ‘A3.4 Installing Cucumber (and RSpec)’ ?

Photo on 2009-10-01 at 13.52_pragsmall
05 Dec 2011, 16:51
Don Fox (4 posts)

Matt

The e-book I’m using doesn’t have these instructions. Appendix 3 contains one sentence “This book refers to several 3rd party tools. They are all listed in this appendix”, but nothing else!

Maybe I have an old version of the e-book?

Avatar_pragsmall
05 Dec 2011, 17:27
Matt Wynne (87 posts)

Hi Don.

The last beta (B9.0) released on 11th November should have the full installation appendix in it, I believe.

Photo on 2009-10-01 at 13.52_pragsmall
06 Dec 2011, 00:03
Don Fox (4 posts)

Matt

I got the last beta e-book and installed RVM. I have the latest version of Xcode (4.2.1) installed with cc and gcc. While attempting to install ruby-1.9.3-p0 I get an error about the c compiler?

ERROR: There has been an error while running configure. Halting the installation.

[2011-12-05 18:51:04] ./configure –prefix=/Users/donfox1/.rvm/rubies/ruby-1.9.3-p0 –enable-shared –disable-install-doc –with-libyaml-dir=/Users/donfox1/.rvm/usr configure: WARNING: unrecognized options: –with-libyaml-dir checking build system type… x86_64-apple-darwin11.2.0 checking host system type… x86_64-apple-darwin11.2.0 checking target system type… x86_64-apple-darwin11.2.0 checking whether the C compiler works… no configure: error: in /Users/donfox1/.rvm/src/ruby-1.9.3-p0': configure: error: C compiler cannot create executables See config.log’ for more details.

Any suggestions?

Avatar_pragsmall
06 Dec 2011, 00:34
Matt Wynne (87 posts)

Hi Don,

This is pretty well outside my area of expertise, but does this help?

https://discussions.apple.com/thread/2132536?start=0&tstart=0

Please let me know if it does and I’ll try to add something in the text.

Generic-user-small
11 Dec 2012, 17:22
Neal M (1 post)

I was having trouble following the instructions on installing Bundler. But to move forward, I typed:

gem install rspec

And then re-run “cucumber –format progress” it worked for me.

Neal

  You must be logged in to comment