Errata for The Cucumber Book
We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.
The latest version of the book is P2.0,
released 4 months ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.
| PDF |
Paper |
Description |
Found in |
Fixed in |
| 34 |
|
#50216: According to google translate the word regnskapsførerere does not have an english counterpart. When I remove the last "re" it appears to be accountants. When I remove the last "ere" it appears to be accountant. I believe this is a typo on the norwegian word in the example for other languages.--Dave #50216: According to google translate the word regnskapsførerere does not have an english counterpart. When I remove the last "re" it appears to be a ...more...
|
P1.0
27-Nov-12
|
|
| 78 |
|
#50121: "they're a reading"--Trevor Harmon
|
P1.0
02-Nov-12
|
|
| 96 |
|
#50122: "with an features"--Trevor Harmon
|
P1.0
02-Nov-12
|
|
| 148 |
|
#49928: broken linkto github for Cucumber::Ast::Scenario at the bottom of the page (footnote [4])
--Iain Wood
|
P1.0
06-Oct-12
|
|
|
151 |
#50455: Quick note before description - I wasnt able to select the correct version of the book, the one i am reading is P2.0 August 2012.
Just finishing up for the day on Chapter 8 hooks and then just starting Chap 8.5. The example code support_code/14/features/support/debugging.rb is where i hit a snag.
I had written the code into the new file and it didnt work telling me i needed a version of launchy. Now being at the end of the day and not coming across this specific error message i hadnt quite twigged what could be causing this and after double checking what i had written against your examples i was a bit stumped.
However remember a previous example of where sinatra was used i finally though aha
require 'launchy'
would be needed, it then worked :3 (Being a pure manual test analyst for a while i havent coded for about 5 years so i am quite gleeful when i figure something out no matter how small!)
However it feels that this bit of code has either been missed off the example or assumed that the reader would automatically put the required code in and could cause confusions like mine.--Heather Poole #50455: Quick note before description - I wasnt able to select the correct version of the book, the one i am reading is P2.0 August 2012.
Just fini ...more...
|
P1.0
10-Jan-13
|
|
| 151 |
|
#50397: Cucumber scenario always fails when using RackTest driver and the following tag: <button type="submit">Withdraw</button>
Possible workaround:
use Selenium driver instead
Fix:
change tag to: <input type="submit" value="Withdraw" />--ivan #50397: Cucumber scenario always fails when using RackTest driver and the following tag: <button type="submit">Withdraw</button>
Possible workaround ...more...
|
P1.0
19-Dec-12
|
|
| 231 |
|
#50266: Just after adding the necessary gems in the Gemfile there is the command to generate the cucumber files and folders with cucumber:install:
$ cd squeaker
$ rails generate cucumber:install
Even though it is fairly obvious for experienced rails users, shouldn't we also add another line before running the cucumber installation script to install the gems as in:
$ bundle install
as if it is not run it would produce the error:
Could not find gem 'database_cleaner (~> 0.9.1) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.--Kosmas Chatzimichalis #50266: Just after adding the necessary gems in the Gemfile there is the command to generate the cucumber files and folders with cucumber:install:
...more...
|
P1.0
05-Dec-12
|
|
| 231 |
|
#50271: Should the javascript runtime environment gems should also be added to the Gemfile?
If not there is the following error message:
~/.rvm/gems/ruby-1.9.3-p327@rails3_2_9/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect': Could not find a JavaScript runtime. See ...execjs_url... for a list of available runtimes. (ExecJS::RuntimeUnavailable)
So by adding the following should fix this:
gem "therubyracer", "~> 0.10.2"
--Kosmas Chatzimichalis #50271: Should the javascript runtime environment gems should also be added to the Gemfile?
If not there is the following error message:
~/.rvm/ge ...more...
|
P1.0
05-Dec-12
|
|
| 248 |
|
#51485: code snippet capybara/00/features/step_definitions/user_steps.rb at page 248 is Wrong:
Error line:
message_attrs.merge({:user => user})
Correct line:
message_attrs.merge({:user_id => user})
This typo it's causing subsequents wrong cucumber outputs on lines 249, 251, 252, 254 with the followind content:
Can’t mass-assign protected attributes: user
(ActiveModel::MassAssignmentSecurity::Error)
./features/step_definitions/user_steps.rb:16
features/search.feature:3
Please check it out!.
--Alfredo Rico Moros #51485: code snippet capybara/00/features/step_definitions/user_steps.rb at page 248 is Wrong:
Error line:
message_attrs.merge({:user => user})
...more...
|
P2.0
09-May-13
|
|
| 251 |
|
#50227: Book says:
so all we need to add is a field with a name="criteria" attribute
"criteria" should be "query" ?
--Perry Smith
|
P1.0
02-Dec-12
|
|
| 253 |
|
#50228: Page 253-254 has a code snippet split across a page break. With your formatting tools, can you give some weight to not breaking code snippets across pages?
--Perry Smith #50228: Page 253-254 has a code snippet split across a page break. With your formatting tools, can you give some weight to not breaking code snippets ...more...
|
P1.0
02-Dec-12
|
|
| 260 |
|
#50823: This is the chapter on testing javascript enabled web pages. The examples all print with the error:
Can’t mass-assign protected attributes: user
(ActiveModel::MassAssignmentSecurity::Error)
./features/step_definitions/user_steps.rb:16
but this is never addressed in the body of the text. I suspect that an "attr_accessible :user" was dropped or missed from the Messages model class.--Brett Giles #50823: This is the chapter on testing javascript enabled web pages. The examples all print with the error:
Can’t mass-assign protected attributes: ...more...
|
P2.0
14-Feb-13
|
|
| 261 |
|
#50229: The "Running Capybara Against Non-Ruby Applications" box...
Does this imply that you could point app_host to your staging or even your production server and drive it to verify they are working correctly?
If that is true, I think I'd mention it. That sounds really powerful to me.
--Perry Smith #50229: The "Running Capybara Against Non-Ruby Applications" box...
Does this imply that you could point app_host to your staging or even your prod ...more...
|
P1.0
02-Dec-12
|
|
|
267 |
#51206: As of Capybara 2.0, a call to _find_ gives an _ambiguous match_ error when more than one element is found in the page. Because of that, using _find_ here would give an error and fail the scenario. Instead I used sampling with the _anticipate_ library as a workaround. Here's how my step definition looked like:
<pre>
include Anticipate
Then /^the results should be:$/ do |expected_results|
trying_every(0.1).seconds.failing_after(200).tries do
page.all('ol.results li').should_not eq(nil)
end
results = [['content']] + page.all('ol.results li').map do |li|
[li.text]
end
expected_results.diff!(results)
end
<code>--Shaun Dashjian #51206: As of Capybara 2.0, a call to _find_ gives an _ambiguous match_ error when more than one element is found in the page. Because of that, using ...more...
|
P1.0
03-Apr-13
|
|
| 268 |
|
#51545: Capybara 2.0 results in an _ambiguous match_ error when find('ol.results li') is called (as reported in erratum 51206. An easier fix than the one suggested in 51206 is to make the call
find('ol.results li:first-child').
#51545: Capybara 2.0 results in an _ambiguous match_ error when find('ol.results li') is called (as reported in erratum 51206. An easier fix than the ...more...
|
P2.0
19-May-13
|
|