By Developers, For Developers

Historical errata for The Cucumber Book

PDF PgPaper PgTypeDescriptionFixed onComments
32SUGGEST

Remove “try to” from “The —dry-run switch tells Cucumber to parse (it will tell you if your Gherkin isn’t valid) but not try to execute the feature.” This seems to indicate an ambiguity in that in some circumstances, the feature may still execute.

2011-07-20Thanks! Changed to "The --dry-run switch tells Cucumber to parse the file without executing it. It will tell you if your Gherkin isn't valid."
33SUGGEST

“Each feature typically has somewhere between a half and a two dozen sce- narios, each describing different examples of how that feature should behave in different circumstances.” The “a two dozen” is incorrect (the “a” may be removed). Although even after that adjustment, the sentence doesn’t read very fluidly — “a half scenario”.

2011-07-23Changed to regular numbers. Thanks!
135ERROR

You have already activated i18n 0.5.0, but your Gemfile requires i18n 0.6.0. Consider using bundle exec. (Gem::LoadError)
This error has blocked me from proceeding with the scenario. I have removed all from the beginning page 130 (8.1) and followed the instruction but have had this same error show up again. How or what have I done to create this problem.

2011-09-20I'm sorry to hear you have had technical problems following the chapter. It's probably because you are using a different version of Rails than the one we're using in the book. \n \nWe made a deliberate choice to use the git HEAD of the 3-1-stable branch for all the Rails code in this book. This is to avoid too much work to upgrade all the code when the next version of Rails (3.1) is released. (We tried using 3.1.0.rc4, but it had too many problems). \n \nAs soon as Rails 3.1 is released the book will start using that instead of Rails from git. \n \nUntil then, follow the following steps to create your Rails app using the HEAD of the 3-1-stable branch: \n \ngem install thor i18n bundler \ncd /usr/local # Or some other directory that is writeable \ngit clone git://github.com/rails/rails.git \ncd rails \ngit checkout 3-1-stable \ncd /path/to/your/scratchpad \n/usr/local/rails/bin/rails new squeaker --dev --skip-test-unit \n \nPlease confirm that these installation instructions work for you, and we'll add them to the book. (We'll change the installation instructions when Rails 3.1 is available). --Aslak \n \nI just upgraded all of our code to use Rails 3.1.0.rc5, and it works smoothly (3.1.0.rc4 did not). So now the install instructions are simply: Install rails 1.3.0.rc5 and follow the directions in the book, using rails 1.3.0.rc5. --Aslak (July 29)
43TYPO

The example shows “Given I have $200 in my account” but all wording about the step uses “$100” value.

2011-07-20Thanks! This will be fixed in the next beta
41OK

All of chapter 4 uses the incorrect version of “withdraw”, opting to use the more medical “withdrawal”.

2011-07-23Withdrawal can indeed be used in a medical sense, but that is not the only meaning of the word. I am not convinced we use the term incorrectly. \n \nhttp://www.merriam-webster.com/dictionary/withdrawal: "She made a withdrawal from her checking account." \n \nhttp://en.wikipedia.org/wiki/Automated_teller_machine: "Using an ATM, customers can access their bank accounts in order to make cash withdrawals"
25TYPO

No text for footnote 1; “walking skeleton”

2011-07-29Thanks, that's fixed with a reference to Alistair Cockburn's 'Crystal Clear'
32SUGGEST

With the existing page breaks, the blank line in the Feature block is adjacent to the page break between pg 32 and 33.

2011-07-22Thanks for letting us know. Layout issues are fixed after the beta, when we go to typesetting. Sorry that one is awkward to read but it should be fixed as a matter of course before we go to print.
90TYPO

In the two sample code blocks, the first amount.to_i was replaced with amount, but the second was left as amount.to_i

2011-07-23
129TYPO

“you’ll learn how to wok with libraries like FactoryGirl”

Should be “work” instead of “wok”

2011-07-20Fixed - thanks!
134TYPO

“are totally irrellevant to our See messages”

Irrelevant is misspelled

2011-07-21Fixed - thanks! Bonus: corrected misspelling of "precise" in same sentence
107TYPO

In the Matt Says: “really helped thet team to see”

the team

2011-07-20Fixed. Thanks!
27TYPO

directory name “step_definitions” is misspelled in:

adding.feature

step_defintions/
calculator_steps.rb

2011-07-20Thanks! Will be fixed in the next beta.
58ERROR

Doesn’t show “1 scenario (1 pending)” because it doesn’t match step definition.

(cash_withdrawal.feature) Given I have $200 in my account
(steps.rb) Given /^I have deposited \\$(\\d+) in my account$/ do |amount|

2011-07-22Hi Jason, \n \nYou're quite right! The word 'deposited' was added to the scenario on page 46 to help make the step less ambiguous, but it's slipeed back out again. This will be fixed in the next beta release. \n \nThanks for letting us know!
73TYPO

Typo in “exammples” (extra ‘m’)

2011-07-20Thanks! Fixed.
113ERROR

P113 talks about running ‘bundle’ but doesn’t mention having to install the Bundler gem first.

2011-09-20Bundler is used throughout the book, so I think we'll have an installation section in the appendix that covers: \n \n* Installing Ruby (on Linux/OS X/Windows) - including GCC/XCode/DevKit \n* Installing Cucumber \n* Installing Bundler \n \nThen we'll refer to relevant sections of this appendix in various places in the book. --Aslak \n \nI've added a stub appendix and references to it from the places I could see where we've talked about using bundler. --Matt
120SUGGEST

For save_and_open_page, this requires the Launchy gem to be installed. It would be useful for people tell new Cucumber users about this.

2011-07-20Thanks! I have added instructions about installing launchy.
130TYPO

“The option don’t matter too much” – missing ’s’ after option

2011-07-21Fixed - thanks!
21OK

require ‘open3’
I am on windows. Seems like open3 is for UNIX/LINUX. I have installed win32-open3 gem. ( Does this book supposed to provide information for windows users regarding what they supposed to do instead of assuming all users are Linux based?) . I changed the above to require ‘win32-open3’ - it did not work, and tried it with require ‘win32/open3’ - it did not work.

2011-08-03Sorry! It should work for Windows user too, thanks for testing it and giving us feedback! \n \nWe'll change the chapter to use the child-process gem instead. --Matt \n \nopen3 on ruby 1.8.7 uses Kernel.fork, while 1.9.2 uses Process.spawn. Fork doesn't work on Windows, but I think Process.spawn might. Have you tried on ruby 1.9.2? If it works on 1.9.2 we might leave it as-is. --Aslak \n \nI can confirm that ruby 1.9.2p180 on Windows has no problems using open3 - at least not in the examples in this chapter. The installation appendix in the book will be explicit that 1.9.2 is required. Closing this ticket.
91TYPO

In Figure 5 Transforms: How Do They Work? Two instances of Tranform should be Transform.

2011-07-22Fixed. Thanks for spotting that one Steven!
90SUGGEST

Why leave the “amount.to_i” in the assertion line for the balance?

2011-07-22This is a duplicate of #47279. You've got to be quick to get in before Greg :)
18TYPO

This sentence, located mid-way down the page, does not make sense: The Gherkin features call step definitions which provide the link between to the application being built.

2011-08-01Fixed - thanks a lot! --Aslak
44TYPO

The regular expressions on PDF pages 44 to 46 are missing the ^ and $ anchors.

2011-08-01We deliberately omitted the anchors in the beginning of this chapter and only introduce them later when they are explained (page 54). I have removed all anchors up until this point to avoid confusion. --Aslak
77TYPO

Near the end of the page, the — before slow likely should be --tags on the line that reads: cucumber --tags breakfast —@slow

2011-08-01Fixed - thanks! --Aslak
49TYPO

The ‘Transfer funds from savings into checking account’ scenario code fragment in section 4.3 Multiple Captures has extra ‘I’s after the ’Then’ and ‘And’ clauses. Should be:

Scenario: Transfer funds from savings into checking account
Given I have deposited $10 in my Checking Account
And I have deposited $500 in my Savings Account
When I transfer $500 from my Savings Account into my Checking Account
Then the balance of the Checking Account should be $510
And the balance of the Savings Account should be $0

2011-08-01Fixed - thanks! --Aslak
48TYPO

At the end of the page, typo in and missing full stop at the end.

the command cucumber —i18n

2011-08-01Fixed - thanks! --Aslak
87ERROR

I added the empty Account class in section 6.1 as described and ran cucumber. But instead of the first step succeeding, it fails as follows:


$ cucumber
Feature: Cash Withdrawal

Scenario: Successful withdrawal from an account in credit # features/cash_withdrawal.feature:2
Given I have deposited $100 in my account # features/step_definitions/steps.rb:4
wrong number of arguments (1 for 0) (ArgumentError)
./features/step_definitions/steps.rb:5:in `initialize’
./features/step_definitions/steps.rb:5:in `new’
./features/step_definitions/steps.rb:5:in `/^I have deposited \\$(\\d+) in my account$/’
features/cash_withdrawal.feature:3:in `Given I have deposited $100 in my account’
When I request $20 # features/step_definitions/steps.rb:8
Then $20 should be dispensed # features/step_definitions/steps.rb:12

Failing Scenarios:
cucumber features/cash_withdrawal.feature:2 # Scenario: Successful withdrawal from an account in credit

1 scenario (1 failed)
3 steps (1 failed, 2 skipped)
0m0.003s
—-

It fails in the same way if I use the steps.rb linked in the PDF at that point.

Changing the class definition to the following makes the step pass as expected:


class Account
def initialize(balance)
end
end
—-

For reference:

$ ruby —version
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10]

$ cucumber —version
1.0.2

2011-08-01All of the code in this book assumes ruby 1.9.2 (we'll make this clear in the installation appendix). I assume you are using an older version of Ruby. 1.9.2 defines a default constructor for Object (and all subclasses) that can take any number of arguments: \n \nhttp://redmine.ruby-lang.org/issues/2451 \n \nHowever, the ruby team realized this was a bad idea (I agree) and reverted it later, so when 1.9.3 is out, the default constructor taking any number of args will be gone again: \n \nhttp://redmine.ruby-lang.org/projects/ruby-19/repository/revisions/29638 \n \nI have introduced an explicit constructor to make this work on all rubies. \n \nThanks! --Aslak \n
92TYPO

eq(amount.to_i) should be eq(amount) in the step definition (two occurrences on PDF page 92, one on page 93).

2011-08-11Well spotted. Should be fixed in beta3
31SUGGEST

From @andypols via a private email:

One minor thing: I have just been reading the Gerkin basics. I think it would be much better if you used the same domain for how not to do it and how to do it. Its confusing when you talk about not writing “If a customer enters a credit card bla bla…” and then you say the way to do it is about changing your username!

2011-09-20
134TYPO

The see_messages.feature file has a small typo in the Scenario line:

Scenario: See another users’s messages
->
Scenario: See another user’s messages

2011-08-11Fixed in beta3 of the book. Thanks! --Aslak
19SUGGEST

I don’t think you need download links on listings of output. On this page, there’s first_taste/01/features/adding.out, but this is only one of many.

2011-08-11We had put this on the backburner. Will be fixed in beta3.
35TYPO

Section 3.4, third para, “Each feature typically has somewhere between five and a twenty scenarios,”: “a twenty” should be “twenty”.

2011-08-10Fixed, thanks!
46TYPO

Regexes in examples on pages 46-48 have no anchors. On page 56 you say “You’ve probably noticed that the step definitions we’ve been using in our examples always start with a ^ and end with a $.” From erratum #47310 it appears that your policy used to be to omit anchors until they had been explained, but I guess this has changed and pages 46-48 still need correcting.

2011-08-11You haven't seen the changes yest. They will appear in beta3 of the book. Closing this.
123TYPO

Adding the ‘launchy’ gem to the Gemfile is talked about and then the code for the Gemfile is shown without the ‘launchy’ gem.

2011-08-11Fixed in beta3 of the book. Thanks! --Aslak
115TYPO

In the box titled “Test Automation is Software Development”, third para:
“Testing and software development are complimentary skills” - “complimentary” should be “complementary”.

2011-08-11Fixed in beta3. Thanks!
123TYPO

The launchy gem isn’t included in the listing at the top of page 123.

2011-08-10Thanks for reporting this. Closing as it's a duplicate of #47351
171TYPO

“Examining Aruba’s Step Defintions” - missing i in “Definitions”

2011-08-17Thanks! Fixed in beta4. --Aslak
171TYPO

At the end of the page, you wrote:
“”"
Change the feature to say “Then it should fail with:” instead of “Then it should pass with:”.
“”"
but the example output was made out of the original “Then it should pass with:” so failed to show us how “Aruba failed our step” (following page.)

2011-08-17Thanks! Fixed in beta4. --Aslak
99ERROR

the text

“my_account.balance.should eq(amount.to_i) ”

should be

“my_account.balance.should eq(amount)”

In other words remove the to_i, because the Transform code is applying the to_i elsewhere.

in three locations on this page.

(BTW loving the book so far :D )

2011-08-17Good catch - will be fixed in beta4. Thanks for the kind words - very glad you like what you have seen so far :-) --Aslak
86SUGGEST

About half way down the page the sentence “… with my_account stored as an instance variable:" is a bit confusing; dropping the possibly makes it clearer: ”… with my_account stored as an instance variable:".

2011-08-17I agree, it's clearer if we remove the @ in the sentence. Fixed in beta4. Thanks! --Aslak.
23TYPO

“beskrvive” should be “beskrive” in the phrase “No matter if your users speak Norwegian or Spanish, med Gherkin kan du beskrvive funksjonalitet i et språk de vil forsta”

2011-08-17En eneste seting på norsk i boka, og jeg klarer ikke en gang å stave riktig. Takk :-)
57ERROR

In the middle of the page there is a feature refactored to use background. The background is given a description, however this description begins with the keyword “When”, which is interpreted as a step.

Running this feature gives the following output (irrelevant bits deleted):

You can implement step definitions for undefined steps with these snippets:

When /^the bank issues new cards to customers, they are supplied with a Personal Identification Number \\(PIN\\) that is randomly generated by the system\\.$/ do
pending # express the regexp above with the code you wish you had
end

2011-08-17Oops! Changed When to Whenever. Will be in b4. Thanks!
77ERROR

More of an inconsistency than an error, really. When defining the Account class directly in the step definition, the first step definition also changes.

In the first version, the step definition is as follows:
Account.new :balance => amount.to_i

In the second, it reads:
Account.new(amount.to_i)

2011-08-17Thanks! Will be corrected in beta4
81ERROR

Quote: “As our test suite grows, we can imagine these calls to to_i() littering our step definitions. Even these three characters count as duplication, so let’s stamp them out.”

If underscore is a character, then to_i is actually four characters, not three :)

2011-08-17Thanks! Fixed in beta4. --Aslak
81SUGGEST

Probably a question of personal preference: I can’t recall ever seeing to_i called with parentheses in the wild (the same goes for any ruby method that doesn’t take arguments).

Thus “We still have one issue left on our list which is the duplication of the calls to to_i().” reads a bit funny as the parentheses seem a bit out of place.

2011-08-17Fixed in beta4. Thanks! --Aslak
92TYPO

The last sentence on page 92 (continues on page 93) reads:
“You use it to prepare the environment ready for the rest of your support and step definition code to operate.”

I think you either “prepare for” something or “get ready for” something, not “prepare something ready for”.

2011-08-17Apparently we wanted to both prepare for and get ready in the same sentence! Fixed in beta4. Thanks! --Aslak
171ERROR

Book says “Let’s try to provoke a failure. Change the feature to say Then it should fail with:
instead of Then it should pass with:.” but example cucumber output still shows “Then it should pass with:”

2011-08-17Thanks! Fixed in beta4. --Aslak
173TYPO

“…Aruba when we wrote those this scenario,…” should read “…Aruba when we wrote those scenario,…”

2011-08-17Thanks! Corrected to "...Aruba when we wrote this scenario". Will be in beta4. --Aslak
181TYPO

First Aruba regex example:
“to the STDIN, STOOUT and STDERR” should read “to the STDIN, STDOUT and STDERR”

2011-08-17Thanks! Fixed in beta4. --Aslak
77TYPO

“for ever,” should read “forever,”

2011-08-17Thanks! Will be fixed int beta4.
106SUGGEST

Add
require ‘rubygems’
before
require ‘sinatra’
in nice_bank.rb

without which the web server will not run

2011-08-17I went ahead with the suggestion in #47389
106SUGGEST

As an alternative to my previous comment for this page you could change the text:
ruby lib/nice_bank.rb
to
ruby -rubygems lib/nice_bank.rb

2011-08-17That works. Changed in beta4. Thanks! --Aslak
93TYPO

About a third of the way down the page, “and the call to World()” is italicized; possibly only “World()” should be in italics.

2011-08-17Agree - that looked a little weird. Fixed in beta4. Thanks! --Aslak
96TYPO

In the second paragraph, change “There” to “there” in “… any use yet: There’s no external …”.

2011-08-17Thanks. Fixed in beta4. --Aslak
109SUGGEST

Near the bottom of the page, I had to read “We got around the whiteboard with our user experience team, and …” several times before it clicked. How about: “We gathered around the whiteboard with our user experience team and …”?

2011-08-17Thanks, much better. Fixed in beta4.
115TYPO

Near the middle of the page, “For the CashSlot we’ll change our World extension module to read the web application’s setting instead of creating iterations own:” should to be changed to something like “For the CashSlot we’ll change our World extension module to use the web application’s setting instead of creating its own instance:”.

2011-08-17Thanks! Fixed in beta4. --Aslak
8986SUGGEST

The code silently changes to: @my_account.balance.should eq(amount), “Expected the balance to be #{amount}”
from: my_account.balance.should eq(amount), “Expected the balance to be #{amount} but it was #{my_account.balance}” on page 86pdf, 83book.

I’ve found this a couple of times while reading/playing along. I personally don’t copy and paste the code. So, it is confusing when other parts of the code disappear or change without being mentioned.

2011-09-20Sounds like the reader missed the sentence above the code: \n \n"Here’s how the code looks with ␣␣␣␣␣␣␣␣␣␣ stored as an instance variable:" \n \nNot sure what else to do. --Aslak \n \n \nI'vesplit that sentence onto a new line so it stands out more. I think that should help. \n@Bob please keep telling us when it doesn't make sense! --Matt
9087SUGGEST

The sentence “We’ve moved the code that initializes the Account out of the first step definition into the new method.” makes sense only if you download the code. It is not obvious from reading what was really changed. Not only do you remove the initialization code, but you also revert the instance variables.

Instead of saying “… but we don’t really like leaving instance variables in step definitions like this.” on the previous page, maybe you need to say something to the effect of there is a better way; revert to the version before the instance variables.

2011-09-20Thanks. I've added a paragraph on the previous page giving the reader a heads up that we're about to revert/refactor the code, and I've changed the listing to show the amended step defs as well as new new helper module. --Matt
5SUGGEST

Context: As developers, this helps
us stay honest and avoid the tempation to gold-plate our code.

The “gold-plate” reference is somewhat confusing and doesn’t clearly represent what the author may be trying to convey.

2011-09-20I changed the wording to be more clear. Thanks for the feedback.
9SUGGEST

The code on the bottom of the page is somewhat cut off in the middle of a block. This makes it somewhat difficult to read with good comprehension. Can there be a page break before the block?

2011-08-25This will be fixed during typesetting before the final book. The beta books will still have breaks like this.
19TYPO

Context: One of the things we love about working outside-in with Cucumber is how it helps us to stay focussed.

On this page you use the UK spelling of the word ‘focused’, but elsewhere you use ‘American’ spellings, like when you use the word ‘color’. Go go gadget consistency. :D

2011-08-31Fixed in beta5. Thanks!
25SUGGEST

Context: You can even include empty lines, like this one:
In the feature file, this is broken up over two pages just after this line, rendering the example a bit confusing. As a suggestion, either fix the example to be on the same page by moving the context line down on the next, or include line numbers in the code examples. Mmm, that sounds like such a nice feature.

2011-08-25This will be fixed during typesetting before the final book. The beta books will still have breaks like this.
126TYPO

The second User.create! example in the “Joe asks” section uses single quotes around the first four string literals, but double quotes around the last two (“Test” and “User”).

2011-08-31Fixed in beta5. Thanks! --Aslak
135TYPO

First bullet point in section 8.7: “… in or Rails project …” should be “… in our Rails project …”.

2011-09-12
67SUGGEST

Only suggesting that, in American English, “disoriented” sounds more natural than “diorientated”.

Second line on the page.

2011-08-31Thanks. Fixed in beta5. --Aslak
4TYPO

Section 4.1 Figure 3 withdrawal is misspelled in Feature string

2011-08-31Thanks! Will be fixed in beta5. --Aslak.
124123TYPO

Footnote contains the typo “youl’ll”.

2011-08-31Thanks. Fixed in beta5. --Aslak
124123TYPO

Got interrupted. Several typos in the footnote.

“youl’ll” should be “you’ll”.
“dependepency” should be “dependency”.
“make a brief encounter” might be better said as “have a brief encounter” or “encounter it briefly”.

2011-08-31Fixed in beta5. Thanks! --Aslak
133132TYPO

“only on User” should be “only one User”, last full paragraph on the page.

2011-09-12
137138TYPO

“Still, people keep using it to test web application.” should use the plural, “applications”, after the italicized, dirty little secret.

2011-09-12
139140TYPO

Seems that the line

I just woke up

is missing from the “Then the results should be:” table.

2011-10-20Thanks, I've added a note to hopefully make this clear.
141142TYPO

“wes_steps.rb” should be “web_steps.rb” in the “Joe asks:” callout.

2011-09-12
142143TYPO

The first paragraph ends with

“…we have set ourselves up for failure. The good kind of
failure that tells us what do do next:”

“do do” is a funny typo; should be “to do”.

The last sentence works informally, but it’s not a complete sentence. Guess that’s between you and your editor.

2011-09-12No offence intended! \n \nThanks for all the detailed feedback Eric, it's very much appreciated.
139140SUGGEST

As the chapter develops, it becomes clear that the difference in table lengths between Given and Then is intentional, and used leading up to the discussion of table diffs on p147. I’d suggest that you explain the motivation when the different sized tables are first presented.

I’m reminded of Michael Hartl’s Ruby on Rails tutorial where he tells us that he’s intentionally forgotten to create a view using a generator so that he can show how to add it by hand later on in the chapter.

The attentive reader feels good about noticing that something’s not quite right, and doesn’t fret about it because they know it will be addressed later.

2011-10-20
127128ERROR

I had to add “require ‘factory_girl’” to factories.rb in order to make this work (legacy app on ruby 1.8.7 & rails 2.3.11).

2011-09-11This should be fixed in beta4 of the book. That said, the book really requires Ruby 1.9.2 and Rails 3.1.0. We'll make the version requirements clearer in the final version.
158159ERROR

Elsewhere I’ve mentioned that, ultimately, I need to get cucumber working with a legacy app (ruby 1.8.7/rails 2.3.11). This chapter, which is most important for me, is proving to be a challenge in that environment, so I set up ruby 1.9.2/rails 3.1.0 in order to continue working through the examples.

My scenario does not pass after adding “find(‘ol.results li’)” to search_steps.rb. I have both increased Capybara’s default_wait_time and tried using sleep(), to no effect.

Unable to find css “ol.results li” (Capybara::ElementNotFound)
(eval):2:in `find’

AJAX works as expected when using a browser manually as described at the top of this page.

2011-09-20Recent versions of Cucumber-Rails only support Rails 3.X, and the book will only cover the latest versions of Cucumber-Rails (1.0.3), Ruby (1.9.2) and Rails (3.1.0). \n \nI'm not sure what's causing your scenario to fail. It would help if you told us what ruby version you are on, what OS and what gems you have (gem list). Any error messages and also your code (on github perhaps) would help us resolve your problem. --Aslak
141TYPO

At the top in the “Joe asks:” box.

“Why are wes_steps.rb” should be “Why are web_steps.rb”

2011-09-12
8187TYPO

Second sentence, purple callout: “loses it’s abililty” should be “loses its abililty”.

2011-09-20
9084TYPO

Second paragraph of the main text: “you do want to automated them” should be “you do want to automate them”.

2011-09-20
9185TYPO

Fourth paragraph: “second scenario on it’s own?” should be “second scenario on its own?”.

Fifth paragraph: “The opposite of this, stateless scenarios each ensure” should probably have a comma between scenarios and each.

2011-09-20
9387TYPO

Second paragraph under “Shared Environments”: “team, but the tests scripts too.” should be “team, but the test scripts too.”

2011-09-20
9488SUGGEST

The second paragraph of “Fixtures” has the sentence: “In a legacy system, especially where the design has evolved organically, where creating the single object actually needed for the test you’re working on means you need to create a huge tree of other dependent objects, you’ll feel like the easiest option…”. The middle bit with the “wheres” is nice, and for readability, I’d suggest separating it from the rest of the sentence with emdashes and adding “one”: “In a legacy system—especially one where the design has evolved organically, where creating the single object actually needed for the test you’re working on means you need to create a huge tree of other dependent objects—you’ll feel like the easiest option…”.

2011-09-20
9589TYPO

Second paragraph, purple callout: “stored procedudes, views, functions etc.”, much as it made me laugh, should be “stored procedures, views, functions, etc.”. Note, too, the comma between functions and etc.

2011-09-20
9690TYPO

Top of the page: “other disadvantages that just waiting” should be “other disadvantages than just waiting”.

2011-09-20
9791TYPO

The “Nightly Build” callout:

First sentence: “have a Slow Features, on page 75 caused” is better without the “a”.

2011-09-20
9993SUGGEST

Paragraph before “What We Just Learned”: the sentence “When there’s a problem with the tests, whether that’s an urgent problem like a failing test, or a nagging annoyance like a flickering scenario, put your best people on it, and fix it forever.” might also benefit from emdashes:

When there’s a problem with the tests—whether that’s an urgent problem like a failing test or a nagging annoyance like a flickering scenario—put your best people on it, and fix it forever.

I think you can lose the comma before “or” that way, too.

2011-09-20
10094TYPO

First full paragraph: “at it’s heart it’s a” should have “at its heart it’s a”.

2011-09-20
9286TYPO

Purple callout, second paragraph: “individually in you step definition code” should be “individually in your step definition code”. “or have a big fat set” would fit the opening of the sentence better as “or having a big fat set”.

Third paragraph: “our domain model, (see the FactoryGirl documentation for details on how this is done) all”. The parenthetical remark should come before the comma; “model (…), all”.

2011-09-20
76TYPO

“stakeholders loose interest” should be “stakholder lose interest” (bottom of p. 76 of the PDF in “Bored Stakeholders”).

2011-09-20
77SUGGEST

“they soon become nothing more than a testing tool” - the referent for “they” is unclear. I’m pretty sure you mean the features, but it could easily mean the stakeholders (as it does a little earlier in the same sentence).

2011-09-20
173TYPO

Sentence reads: Have you ever come to a web site and though:

should be “thought”

2011-10-20
208208TYPO

Figure 10. Don’t capitalize “Of” in “Alternative 2: Out-of-Process”

2011-10-20
218218SUGGEST

Since this chapter is structured to contrast the two different approaches to REST API testing, and since section 14.1 is called “In-Process testing of Rack-based REST APIs”, section 14.2 should probably include “Out-of-Process testing” in its heading.

2011-10-20
210210SUGGEST

I know you are planning to put installation steps in the Appendices, but, for the benefit of newbies, you should be explicit that sinatra is a gem, and that they need to add it to their Gemfile and to run “bundle install” before attempting to “require” it.

2011-10-20Thanks. We've re-worked this chapter to work with a Gemfile all the way through.
211211SUGGEST

If readers continue to “bootstrap rails” for new projects as they learned in Chapter 11, they will already have a “features/support/env.rb” and the $LOAD_PATH instructions, mid-page, should be about adding to that file rather than creating it.

2011-10-20It should be clear that you're creating a brand new solution. I've tried to make the introduction to the chapter point that out.
211211SUGGEST

I doubt if it is worth a purple callout box, but you might consider adding a footnote about the façade pattern when it appears in the middle of the last paragraph on the page.

Your editor would know if it should be “a HTTP server” or “an HTTP server”, but since I read it as “HTTP” and not “hypertext transport protocol”, “an” sounds more correct to my ears.

2011-10-20Thanks
211211SUGGEST

Oh, and as a complement to #47688, the reader most likely already has the rack-test gem, so they won’t have to add it to their Gemfile and run “bundle install”! (Last paragraph.)

2011-10-20
218218SUGGEST

In the “Joe asks:” purple callout box:

In the sentence, “For a graphical user interface, such as a HTML web application we should…”, I would definitely insert a comma between “application” and “we”.

I would also change “a HTML web application” to “an HTML web application”; same reasoning as #47690, which is that “H”, though a consonant, has a vowel sound when read in the context of an acronym. Your editor should be the final judge, though, there must be a style guide for this.

2011-10-20Thanks
218218SUGGEST

First paragraph of the text:

I would change the link from “Chapter 8, Support Code, on page 121” to “Section 8.4, Using Hooks, on page 135”.

I would also make a more explicit link between the sentence on “using a proper database” and the “Database Cleaner” purple callout on the next page. If they end up on facing pages in the paper version, that might not be necessary, but otherwise, why not make the connection slightly clearer?

2011-10-20Thanks. The database sidebar has actually moved into it's own chapter now.
219219ERROR

“Put the following file in the root directory…”

I created a new project and rvm gemset for this chapter, and ran the cucumber:install generator and followed along in 14.1. I don’t know at what point my config.ru got created, but it’s already there at this point:

  1. This file is used by Rack-based servers to start the application.

require ::File.expand_path(‘../config/environment’, FILE)
run RESTwebService::Application

2011-10-20Again, this is a misunderstanding that you were buliding a rails app. Please let us know if this is made more clear in the next beta.
219219ERROR

Bottom of page: “you should get a JSON response containing {}”

What I see is a sideways tumbler spilling ice and my drink, plus:

NoMethodError at /fruits
undefined method `to_json’ for nil:NilClass
file: fruit_app.rb location: block in line: 10

and a backtrace, environment settings, and a message that I’ve “enabled the show_exceptions setting”. From your text, I was expecting to literally see “{}” in an unstyled browser window.

2011-10-20We should have told you to install the json gem. That will be fixed in the next beta. \n \nThanks for letting us know how painful it was for you Eric, you've helped us to make a better book!
220220SUGGEST

“… deleting all the code in the features/support/env.rb.”

I would either add the word “file” to the end of that sentence or delete the word “the” before the filepath.

And, related to #47689, if the reader used the generator, they will have started this chapter with an env.rb that contained “require ‘cucumber/rails’” and settings for Capybara.default_selector, ActionController::Base.allow_rescue, and DatabaseCleaner.

It should be clear that these should be deleted in addition to what was added in 14.1.

2011-10-20Thanks
222222ERROR

The hooks.rb file has a “require ‘httparty’”, so the gem needs to be installed before the Before/After code will work. You do tell readers to install it on page 224, but you need to do this earlier.

Perhaps you should tell people to stop the server, and how to stop the server, before introducing the hooks file.

It is a good example to show how to start and stop the server from within cucumber.

2011-10-20Thanks, this will be fixed in the next beta.
11OK

The diagram should really be above or below the code snippets, not in the middle of them. It kinda hinders.

2011-10-20Thanks, this kind of thing will be picked up when we go into typesetting in a few weeks. Right now it's typos and anything that's misleading / awkward to understand that we need to fix.
13SUGGEST

in first_taste/04/features/step_definitions/calculator_steps.rb where you `require ‘open3’ perhaps it would be better to subliminally hint at lazy loading by putting the `require ’open3` inside of `When /^the calculator is run$/ do

2011-10-20Thanks Jordan. We've actually re-worked the example to remove open3 altogether, you'll see the simplified example in the next beta.
148TYPO

The text refers to “We initialize the MessageQueue class” but the class illustrated in the example is the TransactionQueue class.

2011-10-20Thank you!
155TYPO

“To satisfy youself that our new method…” should be “To satisfy yourself that our new method…”

2011-10-20
143TYPO

In the first sentence, “simpistic” is not a word.

2011-10-20Thanks Sam.
143TYPO

In the second paragraph, “font-end” is written with a hyphen and “back end” is two words. These two ‘words’ should be consistent in spelling.

2011-10-20
92TYPO

his managers thought we was crazy

should be

his managers thought he was crazy

2011-10-20Well spotted! Thanks.
93TYPO

< put come concentrated
—-
> put some concentrated

2011-10-20Well spotted! Thanks.
192TYPO

“we described the over-all flow” - overall shouldn’t be hyphenated

2011-10-20
202TYPO

“you will se that the search field is populated with the search” - se -> see

2011-10-20
85TYPO

First sentence of the third paragraph of the “Leaky Scenarios” section : “anther earlier scenario” should read “another earlier scenario”

(except if The Cucumber Book has changed into a botanic book :-) — wiktionary: “anther: (n.) The pollen-bearing part of the stamen of a flower.”)

2011-10-20:) Thanks, fixed.
5TYPO

tempation -> temptation
@last line

2011-10-20
147TYPO

In “Synchronizing with Delayed Job”, the first paragraphe after the code excerpt: “you’ll make sure your they will wait here” either there are missing words after the “your”, or it can be removed.

2011-10-20
203TYPO

“Without Javascript TDD”, third sentence, “Sice Javascript TDD is a big topic”: sice is not a word (well, it is, but not in English, in Czech :-)

2011-10-20
11ERROR

After using the Transform to convert the Regex into an integer, the “to_i” call has been left in the step definition.

Given /^I have deposited \\$(#{CAPTURE_A_NUMBER}) in my account$/ do |amount|
my_account = Account.new
my_account.deposit(amount)
my_account.balance.should eq(amount.to_i),
“Expected the balance to be #{amount} but it was #{my_account.balance}”
end

2011-10-20Hi, \n \nI thought we'd fixed this, and I can't see what you're seeing. I think the page reference you've put in must be wrong, also. \n \nCould you please re-check this on the next beta?
147144TYPO

change “show” to “shows” immediately after the link to Figure 9.

2011-10-20
151148TYPO

Change “them” to “then” at the top of the page in “… whether the amount is a credit or a debit, them writing it to the queue.”

2011-10-20
173173ERROR

At the bottom of the page in the list of files created by “rails g cucumber:install” is listed “features/support/boot.rb” by which I believe is meant “features/support/env.rb.”

2011-10-20Thanks! We had intended to change Cucumber, because we think boot.rb is a better name, but we probably don't have time. Thanks for reminding us about this.
7TYPO

nutshel should be nutshell

2011-10-20
177177SUGGEST

How about updating the factory_girl sections to correspond to the current preferred syntax and discussing, even briefly, factory_girl_rails?

FactoryGirl.define do
factory :user do |f|
f.username ‘testuser’
end
end

as opposed to Factory.define

2011-10-31Hi Eric, \n \nWe would like to mention FactoryGirl's auto-generated steps, but only if we get time. I've updated the syntax for the FG code in the latest beta - thanks again for the feedback!
85TYPO

“anther” should be replaced by “another”.

3rd paragraph

When one scenario depends upon state left behind by anther earlier scenario in order for it to pass…

2011-11-05
23TYPO

“cruicial” should be “crucial”

“…here to avoid losing users at this cruicial stage of the…”

and

“exiry” should be “expiry”

And I should see a message telling me the exiry data must be wrong

2011-11-05
26SUGGEST

Stay consistent with the use of “(s)”

You use
the context
the event (when there could be more than one)
and
the outcome(s)

2011-11-05
50TYPO

“The pending scenarios become our TODO list for the work we’ll do we do when we drop”

In this part

“we’ll do we do when we”

Remove the “we do”

2011-11-05
58TYPO

“tell a story, because you reader can keep track of stories much better ”

should be “your reader”

2011-11-05
61TYPO

“which is the amounts of money involved”

amount of money

2011-11-05
82TYPO

“The ubiquitous language your team uses will driven by the domain”

should be “will be driven”

2011-10-31
122TYPO

“It’s a good job we caught this now”

should be “it’s a good thing

2011-11-05
129TYPO

“the team and end up with messy test code”

I think this should be “the team can end up with messy code”

2011-11-05
150TYPO

In the Synchronizing with Delayed Job section:

“availlable” should be “available”.

“…but it can be useful to have this availlable for debugging.”

2011-11-05
188SUGGEST

In the specific version of cucumber-rails in our gemfile, the web_steps.rb file has been removed (as you know), and this is a great thing, but it is still mentioned in the book. A user not familiar with previous versions of cucumber-rails may get confused when trying to look for features/step_definitions/web_steps.rb.

“You may wonder why we’re not writing the scenario in such way that we can take advantage of the step definitions in features/step_definitions/web_steps.rb.”

Thoughts?

2011-10-31
29TYPO

Not sure if this counts as a typo - reading the epub version, the logo in the “Matt says” section is really large - at least in iBooks on the iPad. Especially in the two-page landscape view, it pushes the text in the column down to just a couple of words.

It’s also not appearing in the header near “Matt says” - it’s on the next page. This is probably because it’s too large.

2011-11-05Thanks - we'll make sure this is fixed in the final edition
160TYPO

“It print a message to the console”

should be

“It print*s* a message to the console”

2011-11-05
191TYPO

Let’s say your team has agreed to always keep the WIP at or below 3 scenarios. To enforce this, you could run Cucumber with the following option:

$ cucumber —wip @wip:3

This has some interesting side effects. First of all, if Cucumber finds more than 5 scenarios tagged with @wip it will fail immediately without even running any scenarios.

>> I think you mean to say “finds more than 3 scenarios…”

2011-11-05
280TYPO

" the best place is look at Aruba’s own Cucumber features"

should be “the best place to look is Aruba’s own…”

2011-11-05
32TYPO

fron doing this,
should be:
from doing this,

2011-11-05
32TYPO

Guven
should be: Given

2011-11-05
2TYPO

s/cruicial/crucial/ in feature description

2011-11-05
256ERROR

Never mind, the URL in the book is now working for me.

2011-11-04
7764TYPO

Last sentence on the page: “it’s” should be “its”.

2011-11-07
7966SUGGEST

Last paragraph on the page: “snippet is different to normal for the two step definitions”.

I suspect this may be another case of American usage differing from English usage, but this phrase reads strangely to me. On first pass, “different to normal” sets me up to expect a range, as in “fair to middling”. When I try it a second time, I think it should read “different from normal”. Maybe the solution is to rewrite the sentence entirely.

“Notice the different format for the two snippets where we’re expecting to receive a table.”

2011-11-05
254TYPO

“You can read more about Sinatra at http//sinatra.rb.com”

Should be

“You can read more about Sinatra at http//sinatrarb.com”

2011-11-04
32TYPO

In the next to last paragraph you have: Tell the story from the beginning, using Guven steps to set up all the state you need for that particular scenario.

Guven should be Given.

2011-11-07
80TYPO

Often we’ll want to work with it in that raw form, so we can call the row method on it to do just that. - I believe “row” should be “raw”.

2011-12-04
32TYPO

Stateless section.
Last paragraph, 2nd line.
“….using Guven steps….”

2011-12-04
32TYPO

The last paragraph in the stateless section has “Guven” I think it meant “Given”. At the top of the page there is a sentence that goes “There is a an additional keyword…” the word “a” is probably a mistake

2011-12-04
3535OK

Middle of the page :

When you’re working with a particular language, you can discover the key-
words by passing the language code (as listed by the command above) to the
—i18 switch. Japanese, for example:

It says —i18 switch, which should be —i18n as stated in the previous and following example.

PS: so far, very good book. I’m glad I bought it!

2011-12-06I don't understand this erratum, so I'm closing it. \n \n--Aslak
68TYPO

— “run cucumber again you should that the step has failed”
“run cucumber again you should see that the step has failed”

2011-12-04
90TYPO

—" Sue has a different password to Dave"
" Sue has a different password than Dave"

2011-12-04
112TYPO

—“with an maintain.”
“with and maintain.”

2011-12-04
23TYPO

In the second sentence of the fourth paragraph, “…points out…” should be “…point out….”

2011-12-04
26TYPO

In section 1.4, “How Cucumber Works,” the third sentence of the fifth paragraph says “…scenario has having…” when it should say “…scenario as having….”

2011-12-04
5234TYPO

In the last sentence of the second bullet item in the “Take Care of Naming Scenarios” sidebar, “…you won’t need read the code…” should be “…you won’t need to read the code….”

2011-12-04
139TYPO

module MyCusomHelperModule

should be:

module MyCustomHelperModule

2011-12-04
28TYPO

context - code/scenario

this:
And I should see a message telling me the exiry data must be wrong
should be replaced with:
And I should see a message telling me the expiry data must be wrong

2011-12-04
XTYPO

(Do I Need To Know Ruby?)
Ruby is an … can be installed AND run on all major …

2011-12-07
6TYPO

(1.3 Living Documentation)
Cucumber tests share … traditional SPECIFICATION documents …

2011-12-07
75TYPO

(5.4 Nesting Steps - in the scenario code shown)
Scenario: SUCCESSFUL login with PIN

2011-12-07
90TYPO

(First paragraph.)
… fails to help your team to COMMUNICATE. We’ll start by …

2011-12-07
107TYPO

(6.6 Try This - Defection Prevention on Your Team)
Think of three things that are slowing down YOUR team’s production line.

2011-12-07
108TYPO

(6.6 Try This - The last paragraph on the page.)
spot the crucial Then step that was missing from the ORIGINAL scenario?

2011-12-07
164TYPO

(Second paragraph.)
Now that we’re persisting state TO disk in our TransactionQueue and BalanceStore, …

2011-12-07
167TYPO

(Investigating the Flickering)
Run cucumber and give it a try: <— *’d prose incorrectly formatted fixed width (as code).

2011-12-07
174TYPO

(paragraph following the Account class code)
… We are also telling ActiveRecord to run migrations in the db/MIGRATE/ directory. …

(Consistency with downloadable file names and the account.rb code, which use “db/migrate”.)

2011-12-07
175ERROR

When removing the BalanceStore class: ‘features/support/hooks.rb’ also contains a reference to BalanceStore which must be removed.

2011-12-07
260TYPO

(in “Matt says:”)
This gives you the added FLEXIBILITY of being able to actually …

2011-12-07
269TYPO

(15.4 Taking Screenshots - second last paragraph)
… We’re calling the save_screenshot METHOD from Selenium to save …
OR
… We’re calling save_screenshot from Selenium to save …

2011-12-07
269TYPO

(15.4 Taking Screenshots - second last paragraph - note the apostrophe “t” -> “s”)
… we’re using the scenario object’S id as an identifier …

2011-12-07
169SUGGEST

Scenario flickering didn’t appear with only 10 cucumber runs, I needed many more. Try (non-Windows):

“while /usr/bin/true ; do cucumber -f progress feature/cash_withdrawal.feature ; done”

2011-12-07
169SUGGEST

Scenario flickering didn’t appear with only 10 cucumber runs, I needed many more. Try (non-Windows):

“while /usr/bin/true ; do cucumber -f progress feature/cash_withdrawal.feature ; done”

2011-12-06
69TYPO

It’s possibly to tweak the comparison behavior

should be:

It’s possible to tweak the comparison behavior

2011-12-07
69TYPO

It says “This is just a taster of what you can do with data tables in Cucumber.” Should say “taste”?

2011-12-06
136SUGGEST

When reading the ePub on my iPad, the “X pages left in chapter” on the bottom right of the page, the page count seems to indicate sections rather than chapters.
For instance, page 136, start of section 5.1, says ‘4 pages left in chapter’ whereas there are far more than 4 pages to go in chapter 5.

2012-01-07Thanks for the feedback. I spoke to the guys who work on the ebook build, and here's what they said: \n \n"This issue is not something we can fix. He refers to the "X pages left in chapter" on the bottom right of the page -- this measures the number of displayable pages left in the current epub file. Our process breaks the epub files down by smaller sections than chapter, so what he is seeing is the number of pages left in the current section rather than the current chapter. To that extent, the problem is that the epub reader assumes that individual epub files are chapters, which is not always true. We break the files down by section for performance purposes. I'm making a note to re-examine how we divide the epub files." \n \nSo it doesn't look like this will be fixed anytime soon, but we're looking into it. \n
251ERROR

After the contents of Gemfile, but before “cd squeaker”.

Need to run ‘bundle’ after editing Gemfile.
Need to run it for the test group.

2012-08-02
235SUGGEST

Since you’re discussing what the cucumber installer does, it would be useful if you could also explain the line cucumber 1.2.1 adds to the database.yml file when it installs:

cucumber:
<<: *test

I assume it’s doing something like appending a cucumber environment to the test environment, but it would be nice to have this confirmed.

2012-08-02
251TYPO

name=“criteria”
should be
name=“query”

2012-08-02
296TYPO

unnecessary page break before list of platforms

2012-08-13
61SUGGEST

(2nd paragraph) instead of “a reading computer program” you want “reading a computer program”.

2012-08-02
29ERROR

The test.feature file should not live in the root dir, but in the features dir. In case the reader just adds on top of what was done in the previous chapter, this will cause cucumber to load all ruby files in the root directory.

2012-08-02
54%OK

Have not got access to page number as reading book on Kindle. However in the Joe Asks: Should I Show Synchronization Points in My Features section, it states ’we’ve used the eventually method to introduce an implicit sync. I cannot find a reference to the eventually method in the preceding section of the chapter.

2012-08-02Not sure what to do here. It's mentioned in the preceding section with title "Using Sampling to Fix the Flickering" - second paragraph: \n \n"Let’s imagine we have a method eventually in our World that will keep trying to run a block of code until either it stops raising an error or it reaches a time limit. Here’s how we could use it:" \n \nAnd then some code with an eventually method.
46OK

Scenario: Expiry date invalid
When I enter a card expiry date that’s in the past
And all the other details are correct
And I submit the form
Then the form should be redisplayed
And I should see a message telling me the exiry data must
be wrong

in the last line, instead of “exiry”, it should be “expiry”

2012-08-02I can't find this typo. My latest PDF doesn't have it.
291OK

The /^I run “(.*)”$/ step definition is deprecated. Please use the `backticks` version.

2012-08-02I can't see /^I run "(.*)"$/ used anywhere in the book, so not sure how to fix this.
295TYPO

“Out first two steps” should be “Our first two steps”.

2012-08-02
viiiTYPO

“Spoken languages” should be “Spoken Languages”

2012-08-01
xiiTYPO

“I found myself asking.)” should be “I found myself asking)” (no period)

2012-08-01
85SUGGEST

“bravely refactoring in code that previously” can just be “bravely refactoring code that previously” (delete “in”)

2012-08-02
174ERROR

“ActiveRecord was born in the Ruby on Rails framework”. This should make it clear that it was the gem that was born of Rails. The design pattern is older.

2012-08-02
passiOK

If you’re going to use require_relative, you might as well use the new hashrocket-less syntax.

I imagine books will migrate to the Ruby 1.9 syntax over the course of time. It reminds me of the switch to algebraic notation in chess back in the ’70s.

2012-08-02I agree in principle, but it involves a little too much work for a marginal benefit. We'll keep the hashrockets.
0SUGGEST

Bundler instructions assume too much prior knowledge of the reader: could be more user friendly.

See forum topic 10355 (The form won’t let me add a link)

2012-08-02http://forums.pragprog.com/forums/166/topics/10355 \n \nAH: Fixed by adding a Joe Asks section
198OK

“This file must be placed either in your project’s root directory or underneath a directory called config.” Supposed to be “underneath in a directory”?

2012-08-02The current grammar is correct - the suggested fix seems incorrect to me.
217OK

Unused variable in code: try_again.

2012-08-02The variable is unused, but the name serves to explain the code's intent. Keeping it.
284SUGGEST

The list of files at the top of the page could contain Gemfile and Gemfile.lock.

2012-08-02
299ERROR

“These [gems] are installed by adding them to your Gemfile and running bundle update”. Bundle update will work for the example Gemfile, because it specifies all versions. But for the usual project, which should not specify versions (that’s what Gemfile.lock is for), you don’t want to update the whole bundle when adding a gem.

2012-08-02
222TYPO

“Feathers’ [recipe]” should be “Feathers’s [recipe]”. There is only one Feathers here.

2012-08-02You're quite a purist. I like it. Corrected!
257SUGGEST

“we never ran it yet” should be “we haven’t run it yet”

2012-08-02
258SUGGEST

“We’re only entering text … we are not submitting the form by clicking the button or hitting the Enter/Return key”

Instead of “entering”, just say “typing”.

2012-08-02
267OK

“Capybara’s rack mode”

2012-08-02Not sure what this erratum is about.
144OK

On page 144, there is an error in the code:
class UserInterface
def withdraw_from…

withdraw_from should be withdrawal_from to match the method name in the Teller class.

2012-08-02I don't get it. There is no withdrawal_from method anywhere.
144TYPO

Oops. Page 144 doesn’t have an error. Disregard.

2012-08-02
304OK

I had to change my selector as appearing in the 05 code fro movie_steps/rb to get pass from
When /^I create a movie Caddyshack in the Comedy genre$/

The change I made was to call the HTML id as opposed to the natural text for the release year control.

#select “1980”, :from => “Release Year”
select “1980”, :from => “movie_release_year”

I was running a 1.92 ruby and the 05 gemfile. 1.92 is listed as acceptible in the front of the book and 1.87 was causing problems. This is an RVM environment. I may still be having gem issues. I have to run rails generate cucumber:install in your numbered directories to avoid a problem with the cucumber problem.

2012-08-02There are no movies in the Cucumber book. I'm guessing this was meant for the RSpec Book (which is older than the Cucumber book, but also covers Cucumber to some extent).
83TYPO

“Refactor the feature to make use of the new keyword and compare the new version of the feature with the old one.”
The “new keyword” is not some keyword called “new”, but a new keyword (either Background or Scenario Outline, or possibly Examples) and thus shouldn’t be in a monospaced font.

2012-08-02
168TYPO

“It didn’t get chance to update the balance before Cucumber checked it and failed the scenario.”
Should be “didn’t get a chance”.

2012-08-02
176TYPO

“This is why we ’ve removed the :balance field that we had before we refactored the class.”
Extra space in “we ’ve”.

2012-08-02
185TYPO

“The advantage of truncation that it’s a cleaning strategy that works reliably when we have more than one database connection” is missing a verb.

2012-08-02
192TYPO

In “As the number of feature and scenarios grows”, “feature” should be “features”.

2012-08-02
199TYPO

“CI systems detect failure by inspecting the exit status of the processes it’s running”: There’s a singular/plural issue (“CI systems” does not match “it’s”).

2012-08-02
199TYPO

“Cucumber exits only with an error status (a nonzero value) if there is one or more failing steps”: should be “there are one or more”.

2012-08-02
214TYPO

In “They each have their strength and weaknesses”, “strength” should be “strengths”.

2012-08-02
3719OK

Book says:
To get the last step definition working, change the last step definition in
features/step_definitions/calculator_steps.rb to look like this:
Download first_taste/07/features/step_definitions/calculator_steps.rb
Then /^the output should be “([^”]*)"$/ do |expected_output|
@output.should == expected_output
end

However, this does not run. By removing .should from the line “@output.should == expected_output”, the feature passes.

2012-08-02I don't know what "this does not run" means. I'm assuming you don't have RSpec installed. \n \nNot fixing this as I can't see anything wrong with it. The suggested fix is wrong too.
120ERROR

Transform /^(£|\\$|€)(\\d+)$/ do | currency_symbol, digits |
Currency::Money.new(digits, currency_symbol)
end

This piece of code gives an error: “invalid multibyte char (US-ASCII) (SyntaxError)” because the currency symbols (£ and €). To fix this the only way I founded it’s adding “# encoding: utf-8” without the quotes at the very beginning of the file.
Also the transform block should be assigned to CAPTURE_CASH_AMOUNT because it’s used in the following pages.
And because Currency module wasn’t never included in the book, we get an error there too: “uninitialized constant Currency (NameError)”

So, the code should look like this:

  1. encoding: utf-8
    CAPTURE_CASH_AMOUNT = Transform /^(£|\\$|€)(\\d+)$/ do | currency_symbol, digits |
    digits.to_i
    end
2012-08-02
148TYPO

broken linkto github for Cucumber::Ast::Scenario at the bottom of the page (footnote [4])

2016-12-16
78TYPO

“they’re a reading”

2016-12-08
96TYPO

“with an features”

2016-12-08
34TYPO

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.

2016-12-08
251TYPO

Book says:

so all we need to add is a field with a name=“criteria” attribute

“criteria” should be “query” ?

2016-12-16
253SUGGEST

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?

2016-12-08
261SUGGEST

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.

2016-12-16
231SUGGEST

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.

2016-12-16
231TYPO

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”

2016-12-16
151ERROR

Cucumber scenario always fails when using RackTest driver and the following tag:
Possible workaround:
use Selenium driver instead
Fix:
change tag to:

2016-12-16
151SUGGEST

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.

2016-12-16
260ERROR

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.

2016-12-16
267ERROR

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:

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

2016-12-09
248ERROR

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!.

2016-12-16
268ERROR

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’).

2016-12-09
245ERROR

The test examples in Chapter 15, as printed, keep complaining of a Mass Assignment Error. Therefore, we never actually see it working :)

2016-12-16
8TYPO

“When the team write their acceptance tests collaboratively”
should be either:

- “the team writes”
or
- “teams write”

2016-12-08
231-2TYPO

There is a list that spans from page 231-2 and “config/cucumber.yml” is the first and last thing in the list, but with different descriptions.

2016-12-16
236SUGGEST

FactoryGirl is a gem and has no gender. Please don’t personify it in your writing. “poor old FactoryGirl complains that she doesn’t know…”

2016-12-08
28TYPO

Tocino grueso! (Chunky Bacon!) should be Tocino grueso! (Thick Bacon!). Thick bacon is the proper spanish/english translation.

Rick Flores

2016-12-08
19ERROR

The book suggest to write this

Then /^The output should be “([^”]*)"$/ do |expected_output|
@output.should == expected_output
#pending # express the regexp above with the code you wish you had
End

but as the should is a undefined method it doesnt work hence the code must be

Then(/^The output should be “([^”]*)"$/) do |expected_output|
@output == expected_output
#pending # express the regexp above with the code you wish you had
end

2016-12-16
232ERROR

With newer FactoryGirl :
Download rails/02/features/step_definitions/user_steps.rb
Given /^there is a User$/ do
FactoryGirl.create(:user)<——-Original“Factory(:user)”
end

2016-12-16
4ERROR

Footnote 3

h..p://behaviour-driven.org/

displays :

502 Bad Gateway

2016-12-08
69ERROR

Error 404 for footnote 2 h..p://cukes.info/cucumber/api/ruby/latest/Cucumber/Ast/Table.html

2016-12-16
124ERROR

Error 404 for footnote 1 h..p://cukes.info/cucumber/api/ruby/latest/Cucumber/RbSupport/RbWorld.html


2016-12-16
122ERROR

Missing code when adding instance variable.

Error: @my_account.balance.should eq(amount),“Expected the balance to be #{amount}”

Should be: my_account.balance.should eq(amount), \t"Expected the balance to be #{amount}, but it was #{my_account.balance}"

2016-12-16
2513SUGGEST

You should point out that “show-guests” needs to come =before= “home”, otherwise “home” will not be able to see “show-guests”!

2016-12-16
26TYPO

Last paragraph “When the team write their acceptance tests collaboratively” replace “write” with “writes” (or “team” with “teams”).

2016-12-08
3720ERROR

When running cucumber, getting:
DEPRECATION: Using `should` from rspec-expectations’ old `:should` syntax without explicitly enabling the syntax is deprecated. Use the new `:expect` syntax or explicitly enable `:should` instead.

2016-12-16
6549ERROR

Description of \\b in the “Useful Shorthand Character Classes” top box is wrong. It’s a zero-width match anchor. Sounds like you are describing \\W instead. Either change \\b to \\W, or improve the description so that people don’t think it matches characters.

2016-12-16
197ERROR

Between the 2nd and 3rd paragraphs of section 11.5, there’s an example run of cucumber:

$ cucumber —wip @wip:3

That doesn’t work (in v1.3.15, at least): the —wip option doesn’t take arguments, and so cucumber tries to use @wip:3 as a features path. I think the following is correct:

$ cucumber —wip —tags @wip:3

2016-12-16
251TYPO

name=“criteria”
should be
name=“query”

2016-12-16
300SUGGEST

Link to Ruby Version Manager (RVM) web site in paragraph 2
is: beginrescueend.com
should be: rvm.io
Reason: Since sometime around April 2012 beginrescueend.com started to redirect to rvm.io. Currently the link redirects to elizamagazine.com.

304SUGGEST

Footnote 1
is: h..p://beginrescueend.com/gemsets/
should be: h..ps://rvm.io/gemsets/

Categories: