Errata for The RSpec 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 about 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.
| 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 |
||
| 31 |
#46852: checking |
P1.0
11-Apr-11 |
||
| 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 |
#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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 88 |
#48857: missing change mark before: def initialize(secret, guess)--Carlos Silva |
P2.0
01-Mar-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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 203 |
#48688: "Article.stub_chain" should be "article.stub_chain" |
P2.0
09-Feb-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 |
||
| 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 ...more...
|
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 |
||
| 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 |
||
| 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 |
||
| 326 |
#47433: “The Webrat’s default timeout” should probably drop the “the”, agree? |
P1.0
23-Aug-11 |
||
| 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
| 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 |
