The latest version of the book is P1.0, released over 2 years ago. If you've bought a PDF of the book and would like to update it to this version (for free), visit your home page.
By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:
If you've found a new error, please submit it.
- Reported in: P1.0 (27-Aug-18)
PDF page: 1
JSON.generate('error' => result.error_message) -----> JSON.generate('error_message' => result.error_message)--Alexander
- Reported in: P1.0 (15-Sep-17)
PDF page: 20
When running "rspec --profile 2" you display the result as "5 examples, 0 failures". But on the previous page (19), we haven't yet fixed the error for coffee with milk spec:
"Finished in 0.0102 seconds (files took 0.09104 seconds to load)
2 examples, 1 failure".
Wouldn't it be wiser to either fix the error by implementing the missing code or display the error when running with --profile option ?--Serguei Cambour
- Reported in: P1.0 (01-Mar-19)
Paper page: 22
TextMate (TM) is another popular editor and will run xx_spec.rb files and give results. Also has shortcuts. Need to select RSpec in Preferences>Bundles and set the file type to RSpec to get all the goodies. macromates.com. I've been using TM for years.
May require adding the gem coderay to work.--Greg
- Reported in: P1.0 (20-Feb-18)
Paper page: 50
mid page "you can include Ruby modules into and RSpec context"
This could be made clearer by saying "into an RSpec context or describe block" as it is really being included in the latter in this example. If you meant to use context as English and not Ruby code then this mix up is unavoidable.
Great book so far. Thanks!--Nick
- Reported in: P1.0 (09-Jan-18)
- Fixed: 09-Jan-18, awaiting book release
Paper page: 53
"Ruby’s JSON library can safely parse simple a record like this into a Ruby hash:"
Should this be:
"Ruby’s JSON library can safely parse a simple record like this into a Ruby hash:"
difference is "simple a record" and "a simple record"--Travis Spangle
- Reported in: P1.0 (04-Sep-17)
PDF page: 53
"Ruby’s JSON library can safely parse simple a record like this one into a Ruby
"simple" and "a" are in the the wrong order.
"Ruby’s JSON library can safely parse a simple record like this one into a Ruby
--Jacob D Williams
- Reported in: P1.0 (24-Mar-19)
Paper page: 79
Trying out the exercises and the first test wont work. Tried using the source code and this will not work either. I have updated the ledger class also:
context 'when expenses exist on the given date' do
it 'returns the expense records as JSON' do
expect(parse).to eq(['expense_1', 'expense_2'])
it 'responds with a 200 (OK)'
# Maybe I'm missing something but when my code looks like the source it should surely work...
- Reported in: P1.0 (18-Apr-18)
Paper page: 96
The second test uses the same date as the first, which does have entries. Maybe add a note in the text to remind the reader that the database is cleaned out between the two tests. That's why the initial entries don't show up in the second test.--Leam Hall
- Reported in: P1.0 (27-Oct-18)
Paper page: 101
The curl requests don't work. They return "Sequel::DatabaseError: SQLite3::SQLException: no such table: expenses".--Dmitry
- Reported in: B6.0 (23-Jan-18)
- Fixed: 24-Jan-18, awaiting book release
Paper page: 111
Code sample uses 'RSpec.configure do |rspec|; rspec.alias_example_group...' when it should match our code from previous chapters 'RSpec.configure do |config|; config.alias_example_group...'--travis spangle
- Reported in: P1.0 (28-Sep-17)
Paper page: 128
The phrase "but you can also also add helper" contains double "also".--Serguei CambourMyron Marston says: Good catch! We'll be sure to address this in the next edition.
- Reported in: P1.0 (28-Dec-17)
- Fixed: 24-Jan-18, awaiting book release
PDF page: 186
Paper page: 177
I'm not positive this is a mistake, but I would have thought this should say 'RSpec matchers...' as opposed to what it currently says, "RSpec expectations..."
'RSpec expectations perform the same check internally that Ruby’s case state- ment does: they call === on the object you pass in. That object can be any- thing—including another matcher.'--Max
- Reported in: P1.0 (10-Oct-17)
- Fixed: 10-Oct-17, awaiting book release
PDF page: 188
... so you’d like to memoize (cache) the result should be
so you’d like to memorize (cache) the result.--Serguei CambourMyron Marston says: Actually, our usage of "memoize" (no "r") is intentional. We introduce this term on page 12, with a link to a blog post that explains it more in depth.
- Reported in: P1.0 (19-Sep-19)
PDF page: 249
$ rspec -rtrail_map -rsupport/verify_doubled_constants
$ rspec -rsupport/verify_doubled_constants
since we try to avoid expensive loading of the external library but still benefit from checking for missing constants.
- Reported in: P1.0 (15-Jul-18)
PDF page: 336
In the very last page of the PDF, there is a "Contact Us" section with links, including some email addresses. When I click on any of the email addresses (in Preview on macOS 10.13.5), I get an error message in a new dialog box:
"There is no application set to open the URL email@example.com."
This sounds like the URL in the href behind those links is missing the "mailto:" protocol qualifier.--Andrew Janke