small medium large xlarge

Picture 9_pragsmall
02 Dec 2011, 16:40
Perry Vessels (5 posts)

Hi,

Does the code get updated with the book?

Also, I got an error running the first “rake features” command. Seems the tolerate_gracefully/todo/features/step_definitions/cli_steps.rb has a “step” method that is not like. Later on it’s replaced with Given and Then.

Thanks, Perry

Dmfcb_pragsmall
02 Dec 2011, 17:46
David Copeland (487 posts)

could you post the real errors?

One thing I did in the latest beta is to put a top-level Gemfile. The intent is that you go into the top of the code extraction and do bundle install and you should get the right version of everything. I just ran through all the builds two nights ago, but if things don’t work, please post your output here

Picture 9_pragsmall
02 Dec 2011, 18:03
Perry Vessels (5 posts)

Here is the output:

perry@perry-desktop:~/learning/bacla/code/tolerate_gracefully/todo$ bundle install Using rack (1.3.3) Using bcat (0.6.2) Using ffi (1.0.9) Using childprocess (0.2.2) Using builder (3.0.0) Using diff-lcs (1.1.3) Using json (1.6.1) Using gherkin (2.4.21) Using term-ansicolor (1.0.6) Using cucumber (1.0.6) Using rdiscount (1.6.8) Using rspec-core (2.6.4) Using rspec-expectations (2.6.0) Using rspec-mocks (2.6.0) Using rspec (2.6.0) Using aruba (0.4.6) Using gli (1.3.2) Using todo (0.0.1) from source at /home/perry/learning/bacla/code/tolerate_gracefully/todo Using bundler (1.0.0.rc.5) Your bundle is complete! Use bundle show [gemname] to see where a bundled gem is installed.

Your bundle was installed to /home/perry/.rvm/gems/ruby-1.9.2-p0@ruby-book perry@perry-desktop:~/learning/bacla/code/tolerate_gracefully/todo$ rake features (in /home/perry/learning/bacla/code/tolerate_gracefully/todo) Feature: We can accept new items on the standard input

Background: # features/cli.feature:3 Given my terminal size is “80x24” # features/step_definitions/cli_steps.rb:9 And my home directory is in “/tmp” # features/step_definitions/cli_steps.rb:38 And an empty tasklist in “/tmp/todo.txt” # features/step_definitions/cli_steps.rb:26

Scenario: Create a new configuration file # features/cli.feature:8 Given the file “/tmp/.todo.rc.yaml” doesn’t exist # features/step_definitions/cli_steps.rb:42 Given I successfully run todo --filename=/tmp/todo.txt new 'Some new todo item' # aruba-0.4.6/lib/aruba/cucumber.rb:61 When I successfully run todo --filename=/tmp/todo.txt initconfig # aruba-0.4.6/lib/aruba/cucumber.rb:61 Then a file named “/tmp/.todo.rc.yaml” should exist # aruba-0.4.6/lib/aruba/cucumber.rb:211 When I successfully run todo list # aruba-0.4.6/lib/aruba/cucumber.rb:61 Then the stdout should contain “Some new todo item” # aruba-0.4.6/lib/aruba/cucumber.rb:155

START:new_task

Feature: We can add new tasks As a busy developer with a lot of things to do I want to keep a list of tasks I need to work on

#END:new_task Background: # features/todo.feature:7 Given my terminal size is “80x24” # features/step_definitions/cli_steps.rb:9 And my home directory is in “/tmp” # features/step_definitions/cli_steps.rb:38 And an empty tasklist in “/tmp/todo.txt” # features/step_definitions/cli_steps.rb:26

#START:new_task Scenario: Add a new task # features/todo.feature:13 Given the file “/tmp/todo.txt” doesn’t exist # features/step_definitions/cli_steps.rb:42 When I successfully run todo -f /tmp/todo.txt new 'Some new task' # aruba-0.4.6/lib/aruba/cucumber.rb:61 Then I successfully run todo -f /tmp/todo.txt list # aruba-0.4.6/lib/aruba/cucumber.rb:61 And the stdout should contain “Some new task” # aruba-0.4.6/lib/aruba/cucumber.rb:155

#END:new_task #START:home_dir Scenario: The task list is in our home directory by default # features/todo.feature:21 Given there is no task list in my home directory # features/step_definitions/cli_steps.rb:46 undefined method step' for #<Object:0x989cac0> (NoMethodError) ./features/step_definitions/cli_steps.rb:47:in /^there is no task list in my home directory$/’ features/todo.feature:22:in Given there is no task list in my home directory' When I successfully run todo new ‘Some new todo item’ # aruba-0.4.6/lib/aruba/cucumber.rb:61 Then the task list should exist in my home directory # features/step_definitions/cli_steps.rb:50 When I successfully run todo list` # aruba-0.4.6/lib/aruba/cucumber.rb:61 Then the stdout should contain “Some new todo item” # aruba-0.4.6/lib/aruba/cucumber.rb:155

Failing Scenarios: cucumber features/todo.feature:21 # Scenario: The task list is in our home directory by default

3 scenarios (1 failed, 2 passed) 24 steps (1 failed, 4 skipped, 19 passed) 0m1.050s rake aborted! Cucumber failed

(See full trace by running task with –trace)

Dmfcb_pragsmall
05 Dec 2011, 01:17
David Copeland (487 posts)

OK, it seems you have an older version of Cucumber. I’m guessing that aruba doesn’t pull in the latest version necessarily. I updated the Gemfile, so in the next beta/release, it should be fixed, but for now, try

@gem install cucumber -v 1.1.3@

and try re-running the tests

Picture 9_pragsmall
05 Dec 2011, 12:30
Perry Vessels (5 posts)

Thanks! That worked.

You must be logged in to comment