By Developers, For Developers
| PDF Pg | Paper Pg | Type | Description | Fixed on | Comments |
|---|---|---|---|---|---|
| 34 | TYPO | “other forms of docuemntation” should be “documentation” | 2017-02-20 | ||
| 83 | TYPO | “idenfity which text” should be “identify” | 2017-02-20 | ||
| 176 | TYPO | In chapter 5: the text says “The POST route needs to check the succeeded? flag of the RecordResult and set the HTTP status and body accordingly. Open up app/api.rb and change the post ’/expenses’ route to the following” But the code checks for #success?, not #suceeded?. | 2017-02-20 | ||
| viii | TYPO | Paragraph 4, line 2 : | 2017-02-20 | ||
| 3 | TYPO | Page 3 Getting Started With Spec, paragraph 3, second point : | 2017-02-20 | As you noted in #81125, the style we've chosen is to not put periods on the end of bullet points. Marking fixed since there's nothing to do here. | |
| 10 | TYPO | First line : Now that you’re moved | 2017-02-20 | ||
| 3 | TYPO | Forget it, there is nowhere in the book periods after indented paragraphs, except the second to last paragraph on this page : | 2017-02-20 | ||
| 20 | TYPO | Section Running Just What You Need, second paragraph, end of first line : you’ll want to to run just | 2017-02-20 | ||
| 22 | SUGGEST | Top of page after « truncated », I would leave the sub-title | 2017-02-21 | ||
| 50 | SUGGEST | “You don’t need to know anything about Bundler to follow along, but we won’t be explaining it in depth.” I’m not sure the “but” makes sense in this context, because a contrast isn’t being drawn. Maybe a “so”? | 2017-02-21 | ||
| 60 | SUGGEST | “Testers tend to refer to them as mocks, stubs, dummies, or spies, depending on how they are used. Martin Fowler’s article “Test Doubles” explains the nuances. RSpec supports all of these uses under the umbrella term of doubles." Dummies aren’t actually mentioned later in the book when types of RSpec doubles are described, so I wonder if it makes sense to not mention them here either. | 2017-02-21 | ||
| 60 | ERROR | “Since you’ll need to access this phony Ledger instance from all of your specs, you’ll capture it using a let construct, just like you did with the app object in the previous chapter.” I couldn’t find a place where the app object was stored in a let construct in the previous chapter; maybe this sentence was left over from a previous version of the code. | 2017-02-21 | ||
| 75 | SUGGEST | “You’ll want to create separate databases in SQLite for testing and production (so that you don’t clobber your real data during testing).” Typically I’d think of a development/testing contrast here, rather than a testing/production. And later the book does load data into the development database, not production. | 2017-02-21 | ||
| 78 | TYPO | “We want to tell the recorder to save the expense…” This might have been meant to be “ledger”—there is a “record” method, but not a “recorder” (unless we’re naming duck types, which doesn’t seem to be intended!) | 2017-02-21 | ||
| 85 | SUGGEST | “our fast, focused, unit specs.” I think this might be better as “our fast, focused unit specs,” without a comma between “focused” and “unit.” I don’t know the name of the grammatical rule for this, but “unit” functions differently than the other adjectives. It’s kind of part of the name. We aren’t saying we have specs that are fast, focused, and unit; we’re saying we have unit specs that are fast and focused. We wouldn’t say “our fast, unit specs” | 2017-02-21 | ||
| 42 | SUGGEST | I would say : and we won’t be explaining. HTH | 2017-02-22 | Hey Bernard, regarding page 42 vs page 50: that's how all PragProg PDFs work, because there are a number of pages before chapter 1, including table of contents and the preface. In the print book, the pages before chapter 1 starts are numbered with roman numerals, and the PDF mirrors that to be consistent, but then your PDF reader also displays the *absolute* page number. \n \nBeyond that: I'm not sure what you are trying to report here. I need a bit more context to identify what part of the book you mean . Are you just reiterating the issue reported in #81135? If so, we have an improvement coming for that already. Anyhow, I'm going to close; feel free to open a new errata if there's still an issue here. | |
| 42 | SUGGEST | Hi Myron, “You don’t need to know anything about Bundler to follow along, but we 42, 50 or other, does it matter ? - which context helps you the most ? Thanks for your time. | 2017-02-24 | > on which page for you is the sentence... \n \nIt's on a page that has "42" printed on it, but that my PDF reader labels page 50. \n \n> - which context helps you the most ? \n \nI'd say that providing an excerpt (say a sentence or a whole paragraph) of context is the most useful, as that makes it really easy for us to search in our book source and find. We can figure out which kind of page number you mean (e.g. printed on page vs what a PDF reader shows) if you provide sufficient other context. | |
| 48 | ERROR | I have a discrepancy with 04-acceptance-specs/04/expense_tracker/spec/acceptance/expense_tracker_api_spec.rb When running with lines 28 - 32 : post ‘/expenses’, JSON.generate(coffee) I have the following error : $ bundle exec rspec last_response.body=“” Failures: 1) Expense Tracker API records submitted expenses JSON::ParserError: | 2017-02-24 | You get a different error because you are running on Ruby 2.3 whereas our book output is captured from us running on Ruby 2.4. (We recommend 2.4 on printed page 4/pdf page 14 to try to avoid this kind of confusion). \n \nOne error is what JSON.parse("") on Ruby 2.3 raises; the other is what JSON.parse("") on Ruby 2.4 raises. You can safely ignore the different in error there. Both just mean "parsing the JSON failed".``````` | |
| 49 | ERROR | Top of page. $ pwd Failures: 1) Expense Tracker API records submitted expenses expected {“expense_id” => 42} to include {“expense_id” => (an instance of Integer)} # ./spec/acceptance/expense_tracker_api_spec.rb:32:in `block (2 levels) in I have followed the book for the installation, I think. Before I have created a special gemset ‘exptrack’ to isolate the gems installed for the book : $ rvm current * LOCAL GEMS* bigdecimal (default: 1.2.8) | 2017-02-24 | Good catch, thanks. The failure has to do with the fact that you are running on Ruby 2.3 whereas we have been running on 2.4. You can fix the expectation so that it'll pass on any 2.x version of Ruby by changing `an_instance_of(Integer) to a_kind_of(Integer). We have updated the book in the same way. | |
| 50 | SUGGEST | Same as #81150. I may have missed something in the installation. To make the example work, even using the book code freshly re-downloaded, I have to replace line 26 of file ## expect(parsed).to include(‘expense_id’ => an_instance_of(Integer)) | 2017-02-24 | Use a_kind_of(Integer) instead of an_instance_of(Integer). The next version of the book will be corrected. This is a ruby 2.3 vs 2.4 thing again. | |
| 52 | SUGGEST | Bottom of page, using curl. vmEC-Devl:expense_tracker b$ curl localhost:9292/expenses/2016-07-01 I hadn’t seen that the brackets [] are hidden before the prompt, that I’m used to ignore, looking only after the $. Suggestion : a hint to look at the beginning of the line. PS : not to mention that I had copied the line from the book, including the $. So I had errors like $ $ curl localhost:9292/expenses/2016-07-01 | 2017-02-24 | $ is commonly used to indicate a terminal prompt, where you type a command like curl. We plan to add a bit to the intro to make this more clear, so thanks for point out the confusion. As for the hidden brackets before the prompt: we have an improved curl command coming in the next beta that will fix that. Thanks again! | |
| 57 | SUGGEST | Sentence after the second code snippet : —> can contain … AND obscure the code or the printed backtrace, which can contain dozens of lines of framework code, obscureS the application code | 2017-02-28 | ||
| 4 | SUGGEST | You encourage to install Ruby 2.4 and give a bare footnote to ruby-lang.org. As I exclusively use homebrew and RVM, which are so wonderful, for my installations, I did this : $ rvm install ruby believing it would install the latest. The answer made me think that 2.4 was not yet available with RVM. As I had just replaced 2.3.0 by 2.3.3 on February 2. 2017, I thought it was good enough and didn’t worried more about it. Suggestion : I know there are tons of Linux and that you can’t make a chapter on installing Ruby, but explicitly give at least a few of the most used systems. For Windows, Oneclick Installer if it still exists. I used it 12 years ago, very simple and comfortable. No need to compile. | 2017-03-09 | Hi, Bernard. \n \nThanks for this observation. We're reluctant to add any more than we have in the book for Ruby installation instructions—partially because there are so many platforms, and partially because we don't want our instructions to go out of date. We're happy to give advice in the forums, though. \n \nSincerely, \n \nIan | |
| 64 | SUGGEST | I’m going to start my explanation from scratch. Please delete the errata items #81160 page 59, #81158 page 60, #81156 page 61 and #81157 page 62. I suppose that, as author of the book, you are interested to know how a lambda reader perceives and understands it. As I don’t know the content in advance, I have a different point of view. This is how I have perceived things step by step : step 05-unit-specs/02/ on page 58 (always PDF printed page) expense_tracker/spec/unit/app/api_spec.rb has empty examples. step 05-unit-specs/03/ at the bottom of page 61 is so : it ‘responds with a 200 (OK)’ do 1) My surprise is the three arrows. In all Pragmatic Bookshelf books I have read so far, arrows draw attention on new or modified lines of code. Here the whole do/end block is new. Following the practice, it should not be highlighted at all. 2) Then I read the first paragraph on page 62 : “In the highlighted lines, we’ve specified the test double’s behavior: when the caller (the API class) invokes record, the double will return a new RecordResult instance indicating a successful posting.” —> when the caller (the API class) invokes record : for the moment, I don’t understand what it means, so I read further. After the test output I see : “It passes, because the API is already hard-wired to return a 200” Then I still less understand the relationship between the ledger and the status. If 200 is hard-coded, why bother with that allow(ledger) stuff ?. So I comment it out, and the test passes as well. step 05-unit-specs/04/ on page 64 “Implementing the API Behaviour” The post code is changed and it has a side effect on my first example where the allow(ledger) lines are still commented out. As a code writer I would immediately create a new context for the second example. For you it has a pedagogical interest to have both examples with the three allow(ledger) lines, so that you can introduce refactoring and before hook on the next page. My suggestion is as follows : a) On page 61 bottom “Now, you’re ready to fill in the body of the first example:” it ‘responds with a 200 (OK)’ do This example tests the Sinatra status, not the ledger receive. b) Move the first paragraph on page 62 to page 63 after filling the second example in section “Moving On to the Next Spec”. The explanation will be closer to the modification of the post. c) Hence the second paragraph “One other thing” should be “One thing”. d) On page 64, “Moving On to the Next Spec” needs a little change : Now that we know the app is returning the correct status code, let’s move on e) Re-add a new first example changed from it ‘responds with a 200 (OK)’ do to it ‘responds with success’ do allow(ledger).to receive(:record) post ‘/expenses’, JSON.generate(expense) ledger_response = JSON.parse(last_response.body) and change the last two lines of the second example to ledger_response = JSON.parse(last_response.body) Now we have both examples failing instead of only the second one : 1) ExpenseTracker::API POST /expenses when the expense is successfully recorded responds with success expected true 2) ExpenseTracker::API POST /expenses when the expense is successfully recorded returns the expense id expected {“expense_id” => 42} to include {“expense_id” => 417} # ./spec/unit/app/api_spec.rb:49:in `block (4 levels) in Finished in 0.04566 seconds (files took 0.18554 seconds to load) This is more “normal” than with “expect(last_response.status).to eq(200)” which has nothing to do with the ledger, making the first example always green, whatever the ledger is doing. Well, it has been a good understanding exercise for me, printing plenty of traces, values, self, caller backtrace, ancestors, methods in ancestors. Feel free to ignore this post if it is too disturbing. I just try to help making a better book. | 2017-03-01 | Thanks for the detailed feedback! You are right that this section is a bit confusing. We are re-working it significantly (e.g. changing the order of things so it is more obvious why we do it, and so that you aren't left wondering why some lines are needed when the current spec passes w/o them). It will hopefully be in the next Beta. \n \nOn a side note: I think you've discovered that the PragProg errata reporting is poorly suited to back-and-forth conversations, which an issue like this probably warrants. Opening up multiple errata to continue a conversation makes it difficult for us authors to see how many outstanding errata issues we actually have. In the future, when you want to report something likely to warrant a conversation (such as a suggestion or point of confusion like this!) would you consider opening a thread in our forums instead? They are much more conducive to conversation. Of course, reporting errata for reporting simple mistakes, etc is still great. \n \nThanks again for helping us make the book better! | |
| 4 | SUGGEST | I have checked : [One-Click] RubyInstaller is still maintained : https://rubyinstaller.org (hyperlinks are not allowed in errata, remove) The only drawback is that it is still in 2.3.3. | 2017-03-09 | ||
| 65 | SUGGEST | Section Refactoring, paragraph after the code snippet : “These now report “just the facts” of the expected behavior. When a POST request arrives, the response code should be 200 …" I’m sorry to contradict, but we are not testing the server, we are testing the ledger, if I well read the cascade of example descriptions (underscores because spaces are removed when submitting) : ExpenseTracker::API The first example is independent of the ledger implementation and I prove it : —- file spec/unit/app/api_spec_page_65.rb —- puts ‘ spec 13:57’ module ExpenseTracker describe ‘Sinatra’ do before do @xyz = XYZ.new it ‘responds 200’ do allow(ledger).to receive(:record) post ‘/expenses’, JSON.generate(expense) $ bundle exec rspec spec/unit/app/api_spec_page_65.rb spec 13:57 ExpenseTracker::API Finished in 0.028 seconds (files took 0.17943 seconds to load) The example it ‘responds with a 200 (OK)’ should go in a separate context testing the server. | 2017-03-01 | Thanks. I think our re-worked sequence (hopefully available in the next beta) should address this. Please let us know if it does not. | |
| 17,24 | SUGGEST | There is an unnecessary short-circut/lazy-assignment in `initializer` for `@ingredients` in the example `Coffee` class: ``` | 2017-03-09 | It's not an initializer. The method is "def ingredients", not "def initialize". The "||=" is necessary because it is a lazy initialized attribute method. | |
| 241 | TYPO | “a flexible API that mirror’s Ruby’s raise method” - should be “mirrors” | 2017-03-09 | ||
| 124 | TYPO | The text says “This snippet shows off something we haven’t talked about before: getting access to your example’s properties at runtime. You can do so by having your However, the code sample preceding this text does not use “specify”; it uses “it.” | 2017-03-22 | ||
| 293 | SUGGEST | On the spec type cheat sheet, both model and job tests say “Database transactions and model fixtures (available for all spec types, but most relevant here)”, at first it seemed like a mistake. When I read it under model specs I thought it meant “this is the ONE type of spec where transactions and fixtures are MOST relevant.” So I was surprised to see that under jobs too. If the intent is that these features are more relevant in these TWO types of specs than others, changing it to say “more relevant here” seems to avoid this misunderstanding. | 2017-04-06 | Thank you, Josh! We'll make the change you suggest, so that the wording will be clearer. | |
| 294 | ERROR | be_a_new is defined in terms of record.new_record? But be_a_new_record is defined instead in terms of record.persisted? Is that actually the case in the implementation? It seems like the two should have identical newness checks, and the former would just have an additional type check. If this really is the implementation then it’s not clear why, but maybe this appendix isn’t the place to get into that. I guess a footnote could help if the answer is brief, or if it’s helpful for people to know. | 2017-04-23 | We fixed this in rspec-rails: https://github.com/rspec/rspec-rails/pull/1803 and I've updated the book appendix as well. Thanks! | |
| 244 | ERROR | Middle of the page : >> expect(movie).to receive(:record_review).with(‘Good’) I have restarted an IRB session, gave require ‘rspec/mocks/standalone’, then > expect(movie).to receive(:record_review).with(‘Good’) The result is : NameError: undefined local variable or method `movie’ for main:Object —> It seems that the definition of movie is missing, something like : > movie = double(‘Jaws’) even if I had kept the same IRD session since chapter 13. | 2017-04-17 | Yep! As explained on #81372, we chose to not show the full context for that snippet, and we're working on some changes to make that more explicit. | |
| 244 | ERROR | Also missing `imdb’ >> allow(imdb).to receive(:rating_for).and_return(3) # default | 2017-04-17 | Yep! As explained on #81372, we chose to not show the full context for that snippet, and we're working on some changes to make that more explicit. | |
| 246 | TYPO | Middle of the page after class BoxOffice : The good news is that that the hash_including constraint works just as well with —> twice “that”. | 2017-04-09 | Good catch! This'll be fixed (as well as another wrong use of "that that" which I found when addressing this) in the next release. | |
| 248 | ERROR | Top of page, typing in IRB : > expect(client).to receive(:current_price).at_most(:twice).and_return(130.0) NameError: undefined local variable or method `client’ for main:Object > stock_ticker = StockTicker.new(client) NameError: uninitialized constant StockTicker —> I have found a file code/14-customizing-test-doubles/constraints.irbr where all the necessary commands are typed. It is just that they are not printed in the book. Actually “client = instance_double(‘NasdaqClient’)”, IS printed on page 247, but without the green `>>` indicating it has to be typed. As far as StockTicker is concerned, if I type > require ‘./code/14-customizing-test-doubles/stock_ticker’ I have an error : LoadError: cannot load such file — ./code/14-customizing-test-doubles/stock_ticker When I started the IRB session, I used the terminal tab where the current directory was still …/Effective testing with RSpec 3/expense_tracker —> Suggestion : it should be noted on page 223, in the sentence To use this mode, fire up IRB and require the following file: to first `cd` to the parent directory of ‘code’. If I cd .., then “require ’./code/14-…” is OK, because “code” is installed in “Effective testing with RSpec 3”. | 2017-04-17 | In that chapter, many of the examples show isolated snippets that only work in a larger context that we intentionally do not show. Showing the complete context (including the definition of classes like StockTicker) would greatly bloat the examples and distract from the points we are trying to make in that section. We're working on some changes to make it more explicit which code snippets should work as-is and which require more context that we do not show. That should hopefully avoid this kind of confusion for other readers. | |
| 266 | TYPO | Twice “that” in section Stubbing a Constant, paragraph after the code snippet : This pattern is useful enough that that RSpec provides a way to implement —> is it the “that that” you are talking about in #81372 ? | 2017-04-13 | Yep! Thanks for asking, though. | |
| 112 | TYPO | First sentence after section title “Helper Methods” : Sometimes, we get can get too clever for our own good … —> we get can get ?! | 2017-04-17 | ||
| 134 | SUGGEST | Third paragraph in section “Logging Example Descriptions” : First, open spec/support/db.rb and add the following lines to the end of it: —> Also saying to create a `log` directory under `expense_tracker` would avoid the following error : $ bundle exec rspec spec/integration/app/ledger_spec.rb Errno::ENOENT: | 2017-04-18 | Good catch! Thanks. Will be fixed in the next release. | |
| 141 | TYPO | First line : However, as you spec suite grows and starts taking longer to complete —> your instead of you ? My eyes also stopped reading at the last sentence of the second paragraph : Afterward, we’ll dig into how the formatter works. —> expecting Afterwards (well Afterward is US English). | 2017-04-17 | ||
| 146 | SUGGEST | Title of the green info box : Be Careful What You Load from spec_helper.rb —> sounds like a With/About/Of is missing ==> Be Careful With What You Load | 2017-04-18 | Thank you for the suggestion here. In the interest of keeping the title brief, we've omitted the "With" (which in my understanding is optional specifically after the phrase "be careful"). We'll run this by our copy editor to make sure it's okay, though. | |
| 150 | SUGGEST | Second to last paragraph : This example uses the Fuubar formatter, which is one of the more popular —> most instead of more ? (which expects a than : for them enthusiasm is more important than talent / the most important event of my life) | 2017-04-18 | Thank you for keeping us honest, Bernard! We're using the slightly older "one of the more" phrasing here, which is a little less forceful than "one of the most" in this particular situation. As with #81404, we'll verify with our copy editor to be sure. | |
| 15 | TYPO | “In this chapter, we’re going to show you that RSpec’s usefuless isn’t confined” should be “In this chapter, we’re going to show you that RSpec’s usefulness isn’t confined” in chapter 2. | 2017-04-17 | ||
| 67 | TYPO | The ‘Place the following code just inside the first context block:’ seems to be wrong in my PDF - instead of: before do it should be: let(:expense) { { ‘some’ => ‘data’ } } Thanks, enjoying the book so far! | 2017-04-26 | Good catch, thanks! | |
| 26-28 | SUGGEST | The RSpec output in “Marking Work in Progress” includes yellow text on a white background, which is marginally readable in the PDF version of the book. In the ePub version, in Apple iBooks at least, the text is completely unreadable. Perhaps use a more contrasting colour? | 2017-05-11 | Thanks for reporting this! This has been fixed. The final version of the ePub will look much better. | |
| 7 | SUGGEST | The statement below mentions that there should be color. Maybe a note that the color will exist only if you “did” install the mentioned version in the book (3.6.0.beta2). I did not think the version would matter. I installed only using the command `````“gem install rspec” Text from book: | 2017-05-05 | Thanks for the feedback! RSpec improves with every version, and _many_ things in the book are only available if you're on at least a certain version of the book. It would really get in the way of the book's flow if we were constantly stopping to tell the reader what version a new feature was added in. In your case, you ran into the problem with pre-releases: they only install if you explicitly opt-in to them (e.g. raw gem install ignores them). So gem install rspec did not install 3.6.0.beta2. However, 3.6.0 final was released today so it's no longer a problem going forward (and the book's final release will target that version). | |
| 19 | SUGGEST | Looks like there was already syntax highlighting even prior to installing the coderay gem. | 2017-05-11 | There's a lot of coloring RSpec does to the output, but actual syntax highlighting of the failure snippets can only happen if coderay is installed (RSpec itself contains no knowledge of how to syntax highlight Ruby code). Is it possible you confused the general coloring RSpec does with the specific syntax highlighting of snippets enabled by coderay? Or did you already have a version of the coderay gem installed? | |
| 63 | SUGGEST | I think it would be beneficial if there will be an info box that explains what the “allow” RSpec syntax is doing. Other RSpec syntax and terms were introduced/described. I think this would benefit from the same since it has an impact on the interaction with the API. | 2017-05-18 | Thank you, Victor! We've added a sentence after the first use of this method to explain where it comes from and to connect the method to the rest the paragraph. | |
| 67 | ERROR | It looks like there is missing a “let” declaration similar to the one on page 68 for “expense”. The refactored tests on page 67 returns a “NameError” for expense. | 2017-05-18 | Thanks fore reporting this! It's been fixed. | |
| 105 | ERROR | In pdf page 105, the it block in the getting_the_words_right.rb is the following expect(gadget.slices?).to be_true But I think it should be expect(gadget.slices?).to be_truthy | 2017-05-26 | Thanks for reporting this! As it happens, that snippet has already been replaced with a completely different one. | |
| 108 | TYPO | At the bottom of the page: Fix: the path should be ‘spec/integration/app/ledger_spec.rb’ | 2017-06-15 | Good catch! Thanks for reporting this. | |
| 192 | 183 | ERROR | The downloaded file data_generator_spec.rb has incorrect method name(typo). The line 105 of data_generator_spec.rb is the following expect(users).to all_match_the_shape_of_user_record But, it should be expect(users).to all_match_the_shape_of_a_user_record | 2017-07-01 | Good catch! This will be fixed in the final release. |
| 194 | 185 | ERROR | Typo in downloaded data_generator_spec.rb is found in the book, too. expect(users).to all_match_the_shape_of_user_record should be expect(users).to all_match_the_shape_of_a_user_record | 2017-07-01 | Good catch! This will be fixed in the final release. |
| 125 | TYPO | “we’d have to manually keep the two spec files in sync.” The “we” at the start of the sentence should be capitalized. | 2017-07-08 | Good catch! Thanks for reporting. | |
| 53 | TYPO | “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. Should be “Ruby’s JSON library can safely parse a simple record like this one into a Ruby | Thanks for reporting this! At this point, the book has been printed, so it's unfortunately too late for us to fix this typo. If there's a 2nd edition, we'll plan to include this fix (unless the section is entirely rewritten...). | ||
| 20 | SUGGEST | 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: | Great question! \n \nIn the "Identifying Slow Examples" section you're referring to, we aren't intending to show what that's like when applied to the coffee example with a failing spec. Rather, we're showing off the --profile feature when running against the slow_spec.rb file shown in that section. That's why it shows "5 examples, 0 failures", since slow_spec.rb has 5 examples and they all pass. \n \nI'm glad you pointed this out, though, because it is a bit confusing. We'll plan to address this in the next edition by re-ordering the sections or including a better explanation in the text. | ||
| 128 | TYPO | The phrase “but you can also also add helper” contains double “also”. | Good catch! We'll be sure to address this in the next edition. | ||
| 188 | TYPO | … so you’d like to memoize (cache) the result should be so you’d like to memorize (cache) the result. | 2017-10-10 | 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. | |
| 186 | 177 | ERROR | 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.’ | 2018-01-24 | Either "matchers" or "expectations" are appropriate here. Matchers call `===` directly, and expectations contain a matcher, which calls `===` , so it is accurate either way. |
| 53 | TYPO | Text reads Should this be: difference is “simple a record” and “a simple record” | 2018-01-09 | Yep! It's a typo. We'll fix it in the next edition. I'm going to close this as a duplicate of #82024. | |
| 111 | SUGGEST | 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…’ | 2018-01-24 | The block variable can be called anything you want, and both `rspec` and `config` are fine names for the variable. Using a different variable name isn't an error here. | |
| 50 | SUGGEST | mid page “you can include Ruby modules into and RSpec context” | |||
| 96 | SUGGEST | 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. | |||
| 336 | TYPO | 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 support@pragprog.com.” This sounds like the URL in the href behind those links is missing the “mailto:” protocol qualifier. | |||
| 1 | ERROR | 05-unit-specs/07/expense_tracker/app/api.rb JSON.generate(’error’ => result.error_message) ——-> JSON.generate(’error_message’ => result.error_message) | |||
| 101 | ERROR | The curl requests don’t work. They return “Sequel::DatabaseError: SQLite3::SQLException: no such table: expenses”. | |||
| 22 | SUGGEST | TextMate ™ 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. | |||
| 79 | ERROR | 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: it ‘returns the expense records as JSON’ do expect(parse).to eq([‘expense_1’, ‘expense_2’])
| |||
| 249 | ERROR | $ rspec -rtrail_map -rsupport/verify_doubled_constants should be $ rspec -rsupport/verify_doubled_constants since we try to avoid expensive loading of the external library but still benefit from checking for missing constants. | |||
| 85 | TYPO | 2nd para “First, we run all the migration files in to make sure…” |