take056553 (10) [Avatar] Offline
#1
On page 74, after add new steps to features/creating_projects.feature and modified the feature/support/paths.rb.

Book says: "Upon running rake cucumber:ok, you now see that a step passes, but the rest of the feature fails:

And I should be on the project page for "TextMate 2"
And I should see "TextMate 2 - Projects - Ticketee"
expected #has_content?(TextMate 2 - Projects - Ticketee")
to return true, got false

BUT,

This is not the error I got. I got:

And I should be on the project page "TextMate 2" # features/step_definitions/web_steps.rb:230
Can't find mapping from "the project page "TextMate 2"" to a path.
Now, go and add a mapping in /Users/Mac/projects/rails-in-action/ticketee/features/support/paths.rb (RuntimeError)
./features/support/paths.rb:29:in `rescue in path_to'
./features/support/paths.rb:23:in `path_to'
./features/step_definitions/web_steps.rb:233:in `/^(?smilieI )should be on (.+)$/'
features/creating_projects.feature:12:in `And I should be on the project page "TextMate 2"'
And I should see "TextMate 2 - Projects - Ticketee" # features/step_definitions/web_steps.rb:105



Any clues??
ryanbigg (416) [Avatar] Offline
#2
Re: 3.2.4, Setting up a page title, page 74
Did you miss the step from listing 3.20? If you're missing this, then that would cause the test to break the way that you're saying it does.
take056553 (10) [Avatar] Offline
#3
Re: 3.2.4, Setting up a page title, page 74
I did Listing 3.20.
Also I think in the book it did not implement the steps for additional 2 steps:
And I should be on the project page for "TextMate 2"
And I should see "TextMate 2 - Projects - Ticketee"

Stuck here for almost a day o_O
take056553 (10) [Avatar] Offline
#4
Re: 3.2.4, Setting up a page title, page 74
1 suggestion:

This "Write Tests, Implement, progressive improvement" whole ideas are great.
I suggest that next edition of book will put the testing project (ticketee) on github. Then if the reader stuck, they can go to github to get the project, and checkout to that commit where he/she stuck. Then they can compare what's missing there.
ryanbigg (416) [Avatar] Offline
#5
Re: 3.2.4, Setting up a page title, page 74
The project is complete on GitHub here: https://github.com/rails3book/ticketee with each chapter having it's own branch.
take056553 (10) [Avatar] Offline
#6
Re: 3.2.4, Setting up a page title, page 74
Oh Thanks, Stuck on commit 22a6429. Figuring out the diff.