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.1, released over 1 year 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.

Key: Typo Tech. Error Suggestion Not a problem Next edition

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:  

(To find out what version you have, look at the copyright page, a few pages in from the front of the book. If it says (say) 'Second Printing', then here it'll be P2.0. If there are interim PDF releases in that printing, they'll be 2.1, 2.2, and so on.)

PDF Paper Description Found in Fixed in
0

#47920: After location 62 on Kindle, there are some doubled hyphens, which are probably meant to be en-dashes: "Test--Driven". --Ilmari Vacklin

P2.0
08-Nov-11
1
#53274: The "should" expectation syntax (e.g. "[].should be_empty") has been deprecated since RSpec 2.11. Hopefully you'll be updating the code sam...more...
P2.1
03-Dec-13
14

#50476: Last then line missing closing $/--Brian maltzan

P2.1
17-Jan-13
16

#49930: The code sample hello/5/features/step_definitions/greeter_steps.rb appears to be missing a blank line before "Given...".--Wayne Conrad

P2.1
06-Oct-12
31

#46852: checking

P1.0
11-Apr-11
41
#53129: "Cucumber will load features/support/env.rb, which now requires lib/code-breaker.rb, which" lib/code-breaker.rb should be lib/codebreaker.r...more...
P2.1
09-Nov-13
42
#53283: There is some confusion about using the "puts" method on the Output object, which makes it feel like an IO object, and because it is later rep...more...
P2.1
05-Dec-13
42
#47436: The code example is shown as Then /^I should see "([^"]*)"$/ do ... but in the following paragraph, the regex is shown as ([^\"]*) - n...more...
P2.0
25-Aug-11
47
#47907: The "original narrative" shown with the scenario in the lower half of this page is different from the original narrative as it appeared on the...more...
P2.0
06-Nov-11
59

#52282: "subimt a guess" should read "submit a guess" in the third line of the first paragraph on page 59 of the PDF.--Daniel

P2.1
31-Jul-13
59
#46976: A hypen is included in the epub version of the book in the case where the hypen indicated a end of line wrap in the PDF version. The hypen do...more...
P1.0
28-Apr-11
60
#49331: The code in step definition Then /^I should see "([^"]*)"$/ do |message| output.messages.should include(message) end is using shou...more...
P2.0
16-May-12
60
#49332: The need for including RSpec appeared only when I used Guard for automating running Cucumber acceptance tests. When running Cucumber manually ...more...
P2.0
16-May-12
61
#50499: Section 5.1, first paragraph: "game_spec.rb). See Shouldn't We Avoid a One-to-One Mapping?, on page 46 for" should be "game_spec....more...
P2.1
20-Jan-13
61
#49530: [Using ruby 1.9.3-p194] After modifying the line game = Codebreaker::Game.new(output) and running Cucumber the book indicates that the ...more...
P2.0
16-Jul-12
73
#47338: I suggest that the definition of the let() method to be updated/verified. let(<name>) { <block> } i'm beginning to have a suspicion th...more...
P1.0
03-Aug-11
74 59

#53272: Section 6.1, first paragraph: "subimt" should be "submit".--Richard Murnane

P2.1
03-Dec-13
74
#50507: Chapter 6, introduction, first paragraph feature we’re going to tackle is to subimt a guess and get feedback from the "to subimt a" ->...more...
P2.1
22-Jan-13
74

#51957: The third sentence contains 'subimt', should be 'submit'--Robert Newbould

P2.1
10-Jun-13
75
#47110: "Run the specs, and they should all pass." in 2nd para, line 1 To make this a true statement, number_match? need to be in codebreaker/game....more...
P2.0
26-May-11
77

#49741: This is a dummy. Throw me away.

P2.0
25-Aug-12
78
#49532: [Ruby 1.9.3p194; Cucumber 1.2.1; RSpec 2.11.0] Running cucumber on codebreaker_submits_guess.feature, shows 5 passing scenarios, not 14 scena...more...
P2.0
17-Jul-12
80
#49169: Earlier in the book "before(:each)" was introduced and the lines were changed to use @output.should_receive. Now in this section the code is ...more...
P2.0
21-Apr-12
80 92
#51093: undefined method `[]' for nil:NilClass (NoMethodError) ./lib/codebreaker/game.rb:30:in `exact_match?' ./lib/codebreaker/game.rb...more...
B13.0
19-Mar-13
81
#49533: The book states that running the codebreaker_starts_game will fail because of the missing argument... however, it does not fail since a defaul...more...
P2.0
17-Jul-12
88

#48857: missing change mark before:

def initialize(secret, guess)--Carlos Silva

P2.0
01-Mar-12
91
#49495: I am using ruby --version ruby 1.9.3p194 (2012-04-20) [x86_64-linux] rspec --version 2.10.1 cucumber --version 1.2.1 The example cod...more...
P2.0
05-Jul-12
92
#47720: "Ru n t h e s pe c s , an d t h e y s h o u ld all pas s . Ru n t h e s c e n ario s , an d y o u s h o u ld s e e t h at t we lv e ar e pas ...more...
P2.0
07-Oct-11
94
#48835: Chapter 7.3 is all about “Refactor to Express Intent”. A minor improvement could be made to the refactored `number_match?` method to better co...more...
P2.0
28-Feb-12
100
#48874: I think that the marker_spec.rb code presented in this page leads to think that there is only one context at this point in the "describe Marke...more...
P2.0
03-Mar-12
102
#47526: It's being picky, but following the mantra that readability is paramount, isn't this rather cryptic? count + (number_match?(guess, index) ?...more...
P2.0
09-Sep-11
103

#49046: @guess is a string being passed to Marker, map is not a method available to the String class, so use each_char instead, or convert the String to Array--Andre Dublin

P2.0
01-Apr-12
117
#76324: marker = Marker.new('1234','1155') marker.number_match_count.should == 0 should be marker = Marker.new('1234','1155') marker.number_matc...more...
P2.0
22-Jan-14
118
#49079: You do realize that this new implementation could have been achieved by just reversing the order of the checking like this: @secret.include?(...more...
P2.0
07-Apr-12
139

#76401: The third paragraph starts with

so you can refactor

which is suspended in mid-air.

--Bernard Kaiflin

P2.1
12-Feb-14
143

#51836: I try to implement all the suggestion you guys have provide but none of one work--Amrit Deep Dhungana

P2.1
05-Jun-13
145
#50022: In the middle of the page it says: "Assuming that Thing’s initialize() method does this and set_status() does as well, you can write the prev...more...
P2.1
25-Oct-12
145
#76402: In Ruby 1.8.7, the block passed to "yield Thing.new" is executed twice, and the block passed to given_thing_with is not executed. In Ruby 2....more...
P2.1
12-Feb-14
149 139

#53273: Third paragraph starts with a sentence fragment:

"----> so you can refactor <---- There are a couple of.... etc"

(arrows added for emphasis)
--Richard Murnane

P2.1
03-Dec-13
150

#49360: `yield Thing.new do; end` binds the block to `yield` instead of `Thing.new`. Need to use `yield Thing.new { ... }` instead.--David Chelimsky

P1.0
20-May-12
165
#76404: In section "Owned Collections", paragraph 5, line 2 : players_on(). When it receives a message, it doesn’t understand (like players_on()), ...more...
P2.1
13-Feb-14
169
#47171: Third paragraph: Currently Reads: "...anything that begins with have_ to a predicate on the target object beginning with has_" have_ and ...more...
P1.0
08-Jun-11
179

#50335: Book has test-specific subclasspattern

(with no space between subclass and pattern)
--Perry Smith

P2.1
08-Dec-12
182
#76407: Executing the example "describe WidgetsController". $ gem install rails … Successfully installed rails-4.0.2 I have added four missing...more...
P2.1
14-Feb-14
183
#76405: In section Stub Chain, second paragraph : Article.recent.published.authored_by(params[:author_id]) ----> shouldn't it be article ? Al...more...
P2.1
13-Feb-14
188
#76408: Section Custom Argument Matchers. I had difficulties to make an example with calculator.should_receive(:add).with(greater_than_3) wor...more...
P2.1
14-Feb-14
201
#51471: In the first paragraph on the page, the book implies that it is the stub that causes any subsequent calls to log() to be ignored: <quote> ...more...
P1.0
07-May-13
203

#48688: "Article.stub_chain" should be "article.stub_chain"

P2.0
09-Feb-12
210
#50338: 2nd one of these. In the pdf it has: create an autotestdirectory autotest is in italics and directory is normal but there is no space b...more...
P2.1
08-Dec-12
210
#50339: 2nd one of these. In the pdf it has: create an autotestdirectory autotest is in italics and directory is normal but there is no space b...more...
P2.1
08-Dec-12
215
#76411: Section 16.1 Metadata ----> it would be nice to have a green bar with the path of the example : code/extending_rspec/metadata.rb befo...more...
P2.1
15-Feb-14
215
#50340: Suggestion to Pragmatic: it would be nice if I could add and edit previous "erratas". Now to the errata. This is the third one. This isn'...more...
P2.1
08-Dec-12
221
#47193: The code presented to add a rspec:rcov rake task is no longer needed as it is added rails rspec gems. This should at least be mentioned for th...more...
P1.0
18-Jun-11
225

#47685: To run the example it says to type "rspec group_example.rb" but given the filename shown above this should be "rpsec focused_group.rb"--Nigel Lowry

P1.0
04-Oct-11
232
#49537: Under the "Matcher Protocol" subsubsection of subsection 16.7, under the "matches?" list item, the second sentence contains a typo: "Return tr...more...
P2.0
17-Jul-12
232
#49397: "spec_opts takes an array of strings" (first sentence right under the "About Code Coverage" sidebar) but the (non-deprecated) option's name is...more...
P2.0
01-Jun-12
237

#50153: "pending_count)" missing a parentheses, should be "pending_count()".

I'm really enjoying this book so far. Thanks!--Alex Plescan

P2.1
08-Nov-12
238

#49399: network.rb
require 'ping'
ping has been deprecated after ruby 1.8.7
The book needs to show another way of doing ping for ruby 1.9.x--Jim Oser

P2.0
01-Jun-12
251

#45871: On the Kindle 3, the word "fiancé" in the "Cucumber Seeds" box is rendered as "fiancée". The PDF page # given above is actually the location number.--Shea Levy

P1.0
02-Dec-10
253

#49361: In the footnote, the URL to the Cucumber wiki is wrong. Cucumber has moved to another Github repository.--Ulrich Sossou

P2.0
21-May-12
258

#76414: Bottom of the page, the link in footnote 2

h__p://wiki.github.com/aslakhellesoy/cucumber/rdoc

gives an error 404.

--Bernard Kaiflin

P2.1
16-Feb-14
270
#48498: s/pending/undefined/ "Several things changed when we added the step definition. First, the scenario and step are no longer pending, but pas...more...
P2.0
11-Jan-12
273
#45872: In the Kindle edition, chapter 1 has footnotes 2,3 and 4 not no footnote 1. 2, 3 and 4 correspond to 1, 2, and 3 of the PDF edition. PDF page ...more...
P1.0
02-Dec-10
274
#48291: At the beginning of the last sentence of the fifth paragraph (immediately before the "Tagged Hooks" subsection): "When we do,…" is somewhat co...more...
P2.0
15-Dec-11
278

#49603: The url in the footnote does not work. This form doesn't let me input urls to this box so I can't give you the correct one.
--Joseph Shraibman

P2.0
31-Jul-12
287
#49049: In 19.2 "Setting up a Rails 3 Project", running 'bundle install' gives the following error: % rails generate rspec:install WARNING: Cucumb...more...
P2.0
02-Apr-12
288
#47300: Cucumber on rails 3 requires database_cleaner to be added explicitly to the gemfile. Following the steps here gives an error that database_cle...more...
P2.0
21-Jul-11
296
#49498: Content of simulated_browser\05\app\models\genre.rb I downloaded from the website should be: class Genre < ActiveRecord::Base attr_acces...more...
P1.0
05-Jul-12
326

#47433: “The Webrat’s default timeout” should probably drop the “the”, agree?

P1.0
23-Aug-11
338
#50135: The book says "The assigns() method returns a hash representing instance variables that were assigned to the view by the controller. Run rake ...more...
P2.1
06-Nov-12
340
#50136: the book text indicates that there is a change on the line: context "when the message fails to save" do it "assigns @message" do ➤ messag...more...
P2.1
06-Nov-12
347
#47257: Example rails_controllers/messages/13/spec/controllers/messages_controller_spec.rb is missing the line Message.stub(:new).and_return(message)....more...
P2.0
11-Jul-11
348
#47258: In the example rails_controllers/messages/15/spec/controllers/messages_controller_spec.rb the before block needs job.stub(:save).and_retur...more...
P2.0
11-Jul-11
353
#48650: In this section, the messages_controller is altered so that it stores a notice in flash when the message is successfully saved. In the example...more...
P2.0
03-Feb-12
353

#49044: First paragraph reads:

"The most obvious bit is the duplication in the past two examples"

"past" should be "last"--Nigel Lowry

P1.0
31-Mar-12

Stuff To Be Considered in the Next Edition

PDF Paper Description Found in Fixed in
1
#46030: # Quick Thoughts on "The RSpec Book" My rating: 10/10. Heavens gift book! Really. That said, I have a few thoughts... ## On brute-fo...more...
P1.0
16-Dec-10
22
#45749: In section 1.2, end of the second paragraph: the word "is" should be removed from "...but even then, they generally mean is that it's stored s...more...
B16.0
24-Nov-10
34
#45897: The phrase "go ahead and <x>" is used too much throughout the book. It would improve the writing to remove that part and just state the "<x>"....more...
P1.0
05-Dec-10
43
#45883: So, now we have our release plan with 3 stories. It’s time to start breaking it down into iterations. Yet only 2 stories are worked out and...more...
P1.0
03-Dec-10
59

#45737: Under section 4.3 Test Double: "A fake object that pretends to be real object..." should be "A fake object that pretends to be a real object...".--John Topley

B16.0
24-Nov-10
67
#45887: Throughout the PDF, output is colored as though it were code. On page 67, in "prompts for the first guess" the "for" is highlighted as a keywo...more...
P1.0
03-Dec-10
73
#46098: The path cb/325/... threw me for a minute, after seeing a steady progression of 27,28,30,32. I guess you meant 32.5. In the next edition, I wo...more...
P1.0
23-Dec-10
85
#46559: Recommend Enumerable#count, not enumerable#inject. The #count method does exactly what's required here. Using #inject makes the code harder to...more...
P1.0
10-Mar-11
106
#45787: "Create a marker.rb file in lib/codebreaker/, open the Codebreaker module, and copy the Marker into that file." This is unclear to me. I think...more...
B16.0
27-Nov-10
120
#46580: In Ruby 1.9.2 there isn't a String#map method any more. but in this example you could use String#each_char instead. Perhaps you could mention ...more...
P1.0
14-Mar-11
130

#45852: The claim that exponential cost increase in later bug fixes comes from civil engineering would be nice to have footnoted with a source--Greg Cox

P1.0
01-Dec-10
152
#46338: Your code snippet formatter has decided that the text following => is ruby code and highlighted "require" and "and" inappropriately in the sec...more...
P1.0
01-Feb-11
167

#45599: There's a missing space after the comma: "It /is/ DRY,/and/ it's so complicated."--Adam Spiers

B16.0
14-Nov-10
170

#45598: I think "nontechnical" should be hyphenated: "non-technical"--Adam Spiers

B16.0
14-Nov-10
176

#45754: Ruby on RailsRuby on Rails extends ...--Rich Morin

B16.0
25-Nov-10
181

#46738: In "/... for Aslak/", the word for should not be printed like a keyword.

This occurs on pages 181, 184 and 200(4).--Andreas Kemkes

P1.0
03-Apr-11
183

#45797: There should be no comma in "When it receives a message, it does not understand" on line 2.

B16.0
28-Nov-10
193
#45799: "All of the other patterns we’ll talk about and you’ll read about elsewhere are usually variations of method stubs and method expectations..."...more...
B16.0
28-Nov-10
200
#45770: "The first example specifies that the WidgetsController finds the widget, so we set an expectation that the Widget class should receive the fi...more...
B16.0
26-Nov-10
230
#46054: The autotest command appears to be part of the ZenTest gem, which is not listed on page 18. While autotest appears to have been its own gem f...more...
P1.0
19-Dec-10
232
#45801: RSpec::Core::RakeTask.new do |t| t.rspec_opts = ["--color"] end spec_opts takes an array of strings,... Should "spec_opt...more...
B16.0
28-Nov-10
238
#45806: Under the Exclusion heading, "...we tend to try to disable them so we can run rest of the suite..." should be "we tend to try to disable them ...more...
B16.0
29-Nov-10
280

#46742: In ":require", the word require should not be printed like a keyword.--Andreas Kemkes

P1.0
03-Apr-11
287

#46151: The autotest/discover.rb would not be any more generated since this commit f47e87b39a6f2bc24b71d701c8b509fd6e32acb1 in the rspec-rails repository.--Daniel Spangenberg

P1.0
30-Dec-10
300
#45809: "We’re going to focus on Cucumber with Webrat and Selenium, so we’re going to skip over some of the low-level details that we use RSpec for in...more...
B16.0
29-Nov-10
313

#46743: In "/... logged in as .../", the word in should not be printed like a keyword.--Andreas Kemkes

P1.0
03-Apr-11
338
#45907: The messages example in the rails_view chapter works with rails 3.0.0 but does not work when running on rails 3.0.3. The refactoring of new.ht...more...
P1.0
05-Dec-10
344
#46310: "Use Webrat’s have_xpath( ) and have_selector( ) matchers for view specs." I believe this is misplaced and should be moved to the summary of C...more...
P1.0
25-Jan-11
367
#45807: The database migration on this page specifies "recipient_id": "script/rails generate model message title:string text:text recipient_id:inte...more...
B16.0
29-Nov-10