’
But
cucumber features
runs fine
By Developers, For Developers
PDF Pg | Paper Pg | Type | Description | Fixed on | Comments |
---|---|---|---|---|---|
13 | TYPO | Asklak’s name is not displaying properly — Aslak HellesÃÿy set out | 2009-02-23 | ||
13 | TYPO | More UTF errors — his fiancÃl’e, | 2009-02-23 | ||
13 | TYPO | In the third alinea the last name of Aslak is not correct. It now sais HellesÃÿy. | 2009-02-23 | ||
130 | SUGGEST | When describing which gems you need to unpack into the rails project you say: > gem unpack cucumber However on the line above you have > sudo gem install cucumber rspec-rails webrat I know that it’s obvious but you might want to add rspec by itself into that list so that people who aren’t paying attention will try to unpack a gem that they don’t have installed. Therefore it would become > sudo gem install cucumber rspec rspec-rails webrat If they were following the book that won’t happen since we install it earlier, but it might for people jumping around. Thanks Kent | 2009-06-21 | rspec is a dependency of rspec-rails, so you don't need to include it explicitly on the command line | |
13 | TYPO | in the sidebar Aslak’s last name prints as Helles[capital A bar][lowercase y umlaut]y. And later fiance has a typographic error as well. I’m on os x leopard, all updates. In the spring of 2008, Aslak HellesÃÿy set out to rewrite RSpec’s Story Runner with a real grammar defined with Nathan Sobo’s Treetop library. Aslak dubbed it Cucumber at the suggestion of | 2009-02-23 | ||
16 | SUGGEST | Could use a more complete description of how you set up the tutorial project and why in that manner. | 2009-05-29 | ||
64 | TYPO | before used instead of after in the following snippet: set aside | 2009-02-23 | ||
114 | SUGGEST | this is a quibble, but the -colour option in the following snippet makes it seem like a command line arg with the dash as opposed to an option for —format you can also add the –colour option to see passing examples | 2009-02-23 | ||
46 | TYPO | Misspeeling. :) And viola! | 2009-02-23 | ||
67 | TYPO | missing a t on consistent: A good guideline to follow is to keep things consisent | 2009-02-23 | ||
67 | ERROR | Helper module included doesn’t match name of the module Spec::Runner.configure do |config| module is actually UserExampleHelpers | 2009-02-23 | ||
68 | TYPO | We declare a shared example grouip | 2009-02-23 | ||
70 | TYPO | A couple of words got duped here etc, etc declared in the in the | 2009-02-23 | ||
70 | TYPO | another before/after mixup - step 5: 1. outer before | 2009-02-23 | ||
12 | TYPO | In the Cucumber example, the word “for” has been syntax highlighted, which I presume is not needed. Of course, I’m just learning Cucumber so I could be completely wrong… | 2009-03-25 | ||
14 | SUGGEST | My head still spins after looking at the BDD cycle diagram. Perhaps turning it into a flowchart-y diagram makes it easier. | 2009-02-04 | We added flowchart so you both the dizzying nested cycles and the clarifying flow chart. | |
18 | SUGGEST | Before describing which files are responsible for what, a short introduction to installing the gems would be nice. Perhaps in an appendix or sidebar, but definately before page 18. | 2009-05-29 | ||
22 | OK | More syntax highlighting in the plain text scenarios. | 2010-07-18 | ||
29 | SUGGEST | I got sidetracked by the fact that cucumber was run in the examples with -n. IMHO it doesn’t add much value at first, so perhaps run the examples without -n, and introduce that specific command line flag later on in the book? | 2009-07-04 | This is tricky because even though the flag adds complexity to the command, it also reduces the noise in the output. I think I'm going to leave this as/is. \n \nFYI - it's changed to "-s" | |
88 | TYPO | Missing the word ‘in’ ‘But what about when the state we’re interested is …’ should be ‘But what about when the state we’re interested in is …’ | 2009-03-25 | ||
129 | TYPO | ‘the’ Should be ‘that’ in the sidebar. BDD is about writing software | 2009-03-25 | ||
10 | TYPO | The word “that” is repeated twice in “stores a Registration in a Registry’s registrations collection, and that that collection…” | 2009-02-23 | ||
12 | TYPO | In the example: “on line” should be changed to on-line or online. | 2009-02-23 | ||
19 | ERROR | It looks like the root needs a bin directory to match example batch file on page 28. | 2009-03-25 | ||
39 | TYPO | The missing include( ) method is an RSpec expectation matcher method, Should say “[…]rspec exPectations library” | 2009-03-25 | ||
46 | ERROR | It talks about the bin made in the last chapter, but with in the end that bin should be: #!/usr/bin/env ruby -w game = Mastermind::Game.new(STDOUT) | 2010-01-17 | ||
15 | TYPO | 2nd to last paragraph: | 2009-02-23 | ||
15 | TYPO | Last paragraph: “its time” should be “it’s time” | 2009-03-25 | ||
18 | SUGGEST | 3rd paragraph: I’m wondering about the “parallel structure below lib/mastermind and spec/mastermind”. That sounds like the kind of 1:1 relationship between units of code and tests that the first chapter talked about getting away from. | 2009-03-25 | ||
19 | SUGGEST | In figure 2.2, I am wondering why the lib/mastermind and spec /mastermind directories are not shown, and why step_definitions/mastermind.rb isn’t shown. I’m also wondering why the top three directories appear to be in bold while the rest do not. It’s hard to tell if this is an artifact of the rendering or a meaningful part of the picture, though. | 2009-03-25 | ||
20 | SUGGEST | The first paragraph that starts on page 20 says “stories” three times, and then switches to the word “scenarios”. It’s hard to tell if these terms are meant to be interchangeable here, or, if not, what the relationship between them is. | 2009-05-29 | The description of Stories In, Features Out has changed and been moved to the Writing Software that Matters chapter. | |
23 | TYPO | Top: How about: | 2009-03-25 | ||
25 | SUGGEST | 3rd paragraph: This sounds a little odd after using “the code you wish YOU had” a couple times just before this. | 2009-03-30 | The rest of the paragraph reads "we", so I changed it to "It is common to write the code we wish we had doing TDD" - I agree "It is common to write the code YOU wish WE had doing TDD" was confusing, but I think this reads OK now. \n \nThanks | |
26 | SUGGEST | I’m not sure if this is an error or not. End of 1st paragraph of page 26: “This is RSpec’s way of setting expectations about equality.” I thought we were dealing with Cucumber in this chapter? The outer of the two cycles? Should this say RSpec or Cucumber? If ‘RSpec’ is correct, some explanation might help. | 2009-03-30 | ||
29 | SUGGEST | On the matter of -n, I got curious enough to look it up. There didn’t seem to be anything in the documentation wiki yet, but going to the source in Github I got my answer: long form “—no-source”, “Don’t print the file and line of the step definition with the steps.” A brief mention of this might be enough to tie up that loose end for the reader. | 2009-03-30 | ||
29 | TYPO | First paragraph: How about: | 2009-03-25 | ||
29 | TYPO | Start of section 2.5: This doesn’t seem quite right. How about eliminating “to”: From the diagram, it actually looks like we’ve finished step two and are now about to work on step three. | 2009-03-25 | ||
29 | TYPO | Start of section 2.5: The concentric cycles are introduced in the previous chapter (1), not the current one (2). | 2009-03-25 | ||
115 | SUGGEST | a few of the examples use the option colour yet there is a section on -color, it might make sense to standardize on one and/or mention the two are synonymous | 2009-06-17 | ||
119 | ERROR | 9 No mutants survived. Cool! — Not in this example | 2009-03-25 | ||
39 | TYPO | In the final para on the page, “Now one of the two Thens are passing” should read “Now one of the two Thens is passing” (number agreement). | 2009-03-25 | ||
42 | TYPO | Second para on page: “… and is supported by RSpec’s mock framework with a the as_null_object() method:” should read “… and is supported by RSpec’s mock framework with the as_null_object() method:” | 2009-03-25 | ||
126 | TYPO | Section 15.1, “Traditional Rails Development” - second para, penultimate sentence: “… revisit what you’ve already built or make due.” should read “… revisit what you’ve already built or make do.” | 2009-03-25 | ||
27 | ERROR | Much better! Go ahead and copy that code into bin/mastermind.bat if There was no “bin/mastermind” in the game original drawing on p 19 | 2009-03-25 | ||
55 | SUGGEST | Section 8.1, para after the code example - instead of How about either: “We use the describe() method to define…” Or: “We use describe() to define…” The first fits better, given that the following para talks about “The it() method…” | 2009-03-25 | ||
69 | TYPO | In section “Sharing Examples in a Module”, first sentence has “share_examples_for()”. Should be “shared_examples_for()” | 2009-06-17 | The API is actually share_examples_for. shared_examples_for (with a 'd') does work because it is an alias for backwards compatibility. | |
10 | TYPO | Under “Emergent Design” subtitle, at the end of the second paragraph, a period (.) is missing. …are responsible for testing pratices | 2009-02-23 | ||
75 | TYPO | Penultimate sentence on page: “This can to help reduce…” should read “This can help reduce…” | 2009-03-25 | ||
79 | TYPO | Last sentence in para after first code example: “RSpec let’s you express…” should be “RSpec lets you express…” | 2009-03-25 | ||
82 | SUGGEST | Last sentence on page: “Now you could, of course, express this like this:” seems stilted. How about, slightly more verbose, but I think a little more fluent, “Now you could, of course, express the same thing like this:” | 2009-03-30 | ||
84 | TYPO | Last text on page: “… a second argument that is either String message…” should be “… a second argument that is either a String message…” | 2009-03-25 | ||
89 | TYPO | Last sentence on page: “RSpec let’s us use…” should read “RSpec lets us use…” | 2009-03-25 | ||
118 | TYPO | Section 12.3, final para: “… it’s code examples in …” should read “… its code examples in …” | 2009-03-25 | ||
129 | TYPO | Last sentence of last complete para on page: “… have them validate its working …” should read “… have them validate it’s working …” | 2009-03-25 | ||
26 | 26 | OK | I’m with you till about page 26 then you start getting into making Ruby bin files and a few other things, and i get lost. | 2009-05-29 | This is a bit too general. Please feel free to make specific suggestions if you have any. |
33 | TYPO | Last paragraph: How about: | 2009-03-25 | ||
39 | TYPO | Last paragraph: | 2009-03-25 | ||
1 | TYPO | One thing, I’m sure will be in the final version, but just wanted to confirm, normally these types of titles, have started out with some initial conditions of the software. For example, written with version X.Y.Z, assumes the following are installed, and may also include pointers for the installations. It seems like that could create problems down the road if people se variations in how things behave because their setup is different. | 2010-01-15 | ||
43 | TYPO | 3rd paragraph of section 3.3: Should “than” be replaced with “rather than”? | 2009-03-25 | ||
44 | TYPO | Minor style issue: in the top code example, the first two examples are not separated by a blank line. Everywhere else, they are. | 2009-03-25 | ||
46 | TYPO | 2nd paragraph: The comma looks funny there. | 2009-03-25 | ||
46 | TYPO | 3rd paragraph: How about changing “you” to “you’ll” | 2009-03-25 | ||
54 | OK | You interchangeably use Test Driven Development (TDD) and BDD was that intentional I thought they were different although this is also new to me. It may just need to be clearer that you are describing two different aspects of testing. | 2009-12-22 | This is thoroughly explained now in later versions of the beta. | |
142 | TYPO | In “Joe asks…”: “[…] introduce you to the other styles of step defintions […]” should be “[…] definitions […]” | 2009-03-25 | ||
64 | TYPO | In the example on page 64, you have before(:each) twice when the 2nd one should be after(:each). | 2009-03-25 | ||
69 | TYPO | “In addition to share_examples_for” should be “In addition to shared_examples_for”. | 2009-06-17 | The API is actually share_examples_for. shared_examples_for (with a 'd') does work because it is an alias for backwards compatibility. | |
86 | TYPO | :working_to_hard should be :working_too_hard | 2009-03-25 | ||
20 | SUGGEST | The authors use two different formats to write up features: The “in order to” format on page 12 that places the business reason first. Feature: pay bill on line And the Mike Cohn’s “so that” format on Page 20 that places the business value last: Feature: code-breaker starts game While the authors do mention that the narrative is free format, they fail to mention that they used different structured formats in their examples, which could cause some confusion. To avoid possible confusion after the prior code on page 20 you could say: “Note the narrative structure in this example and the one on page 12 are different. We could have just as easily written the feature as: Feature: code-breaker starts game Also while the features narrative is supposedly free format, some tools used with the test tools are dependent on the format. Maybe the authors mention that later. | 2010-01-17 | ||
18 | SUGGEST | The project structure discussed on page 18 and shown graphically in Figure 2.2 on page 19 is confusing. Where does this structure come from? Is the reader supposed to set it up from scratch? Is there some sort of command or tool the read is supposed to run like Rails scaffolding? (I created them manually – was there an alternative?) Which mastermind.rb file is which? What’s in each? Why are the file names identical? Where is the reader supposed to put the codebreaker_starts_game.feature file? Should it have an .rb extension? (It wasn’t too hard to figure out this last one by trial and error, but some advice would have been nice.) | 2009-05-29 | ||
27 | OK | There is further project structure confusion on page 27. Unlike Unix, Windows itself does not commonly have a bin directory, although Ruby does have a bin directory. Perhaps the authors are assuming that the student created the mastermind directory under the Ruby directory? Is so, suggesting it, because the project tree diagram in figure 2.2 doesn’t imply a bin anywhere. Also while Unix uses forward slashes at the command line, Windows uses back slashes, so the correct Windows format might be: C:\\ruby\\bin\\mastermind.bat assuming that is what the authors intended. | 2010-02-03 | ||
27 | ERROR | The file contents #!/usr/bin/env ruby -w Does not work on Windows as a BAT file, so copying the above into mastermind.bat makes no sense. The authors need a Windows specific BAT file or some additional instructions that are missing. Running the above as a BAT file gives the following results: C:\\RubyPrograms\\TheRSpecBook\\mastermind>#!/usr/bin/env ruby -w C:\\RubyPrograms\\TheRSpecBook\\mastermind>$LOAD_PATH.push File.join(File.dirname(FILE), "/../lib C:\\RubyPrograms\\TheRSpecBook\\mastermind>require ‘mastermind’ C:\\RubyPrograms\\TheRSpecBook\\mastermind>game = Mastermind::Game.new(STDOUT) C:\\RubyPrograms\\TheRSpecBook\\mastermind>game.start | 2009-03-25 | ||
28 | SUGGEST | OK, I was wrong, the mastermind.bat does work, but only when run from Cucumber and not as a standard BAT file. So it isn’t really a Windows script in the normal sense, it is a Ruby script that Cucumber finds and runs. If the reader has used Ruby for scripting, maybe this is obvious, but for a reader to uses Ruby primarily from within Rails it is less obvious. The trick to get it to work is to place the mastermind.bat file at the top of the mastermind directory tree, the same place that the reader is using to run Cucumber. Anyway, I think this could use a little clarification. | 2009-03-25 | ||
119 | ERROR | Heckle 1.4.1 was released in 2007, not 2006. | 2009-03-25 | ||
63 | OK | In the code example, how about adding (:capacity => 10) to the calls to Stack.new (as you do on pages 71 and 72) to show that you’re using a stack with a capacity of 10. | 2009-12-06 | ||
64 | TYPO | Top of page: How about “others” instead of “other” | 2009-03-25 | ||
69 | TYPO | Start of 1st paragraph: The quoted phrases “should taste really good” and “should be available by the slice,” have ending quotation marks that face the wrong direction (so they look like opening quotation marks). Also, the comma inside “should be available by the slice,” looks wrong - in the first line, for instance, “Any Pizza” has a comma after it that lies outside the closing quotation mark. | 2009-03-25 | ||
71 | SUGGEST | I’m not fluent in RSpec terminology yet, but this sentence in the first paragraph reads a little confusing: “For example, let’s say you want to express a given in the outer group, an event, or when in the inner group, and the expected outcome in the examples them selves.” It might be mostly a matter of the commas seeming to carry equal weight in the sentence, so it’s hard to tell where one list item in the sentence ends and the next begins. | 2009-03-30 | Changed to "let's say you want to express a given in the outer group, an event (or when) in the inner group, and the expected outcome in the examples themselves." | |
127 | TYPO | top of page: “Building from the models out to the views means writing code based on | 2009-03-25 | ||
143 | TYPO | “showtime_time.strftime(”%l:%M%p" ).strip.downcase" should have an upper “i” instead of a lower “L” as argument to strftime => “showtime_time.strftime(”%I:%M%p“).strip.downcase” | 2009-03-25 | ||
145 | TYPO | Again (see p.143): “showtime_time.min.zero? ? ”%l%p" : “%l:%M%p”" should have upper “i” instead of lower “L” => “showtime_time.min.zero? ? ”%L%p" : “%L:%M%p”" | 2009-03-25 | ||
142 | SUGGEST | Maybe it is easier to keep focused on cucumber if the required commands for creating the movie model and migrating the database are given: - ruby script/generate model movie showtime_date:date showtime_time:time - rake db:migrate | 2009-06-21 | ||
143 | TYPO | Sorry for the entries #37641 and #37642 about strftime with option “%l”. I learned in the meantime that it’s used to get single digits - exactly what we want here :-). | 2009-03-25 | ||
9-15 | SUGGEST | It seemed to me that chapter 1 could use a bit more discussion of the differences between RSpec and Cucumber… specifically regarding the differing strengths and why it is worth taking the time to learn and use two different tools. I only began to feel like I had a handle on it after reading the more detailed sections. | 2009-05-29 | ||
143 | SUGGEST | At least for me the option %l for strftime doesn’t work on windows (no problems with it on my linux machine). A very simple workaround is to convert the time to a datestring first: showtime_time.to_datetime.strftime(“%l:%M%p”).strip.downcase If it was not only me who encounters this problem it would be helpful to add a footnote on that. So you can remove/ignore my previous entries #37641, #37642 and #37645 (I promise this is my last one on this topic :-) | 2009-06-21 | ||
64 | OK | maybe on : describe Stack, “when almost full (with one element less than capacity)” and : describe Stack, “when full” | 2009-06-17 | I wouldn't do that because I'd have to violate encapsulation by exposing capacity. | |
76 | TYPO | End of 1st paragraph of section 9.1: Two things: 1. “it’s” should be “its” 2. How about “implies” or “says” instead of “tells you” | 2009-03-25 | ||
77 | TYPO | 2nd to last paragraph on page: “built in” looks wrong, since the next section name and the first sentence in that next section use the hyphenated “built-in”. | 2009-03-25 | ||
77 | TYPO | Last paragraph: “to access them” sounds redundant here. | 2009-03-25 | ||
82 | TYPO | Top line: (methods being part of the surrounding text rather than formatted as code) | 2009-03-25 | ||
86 | ERROR | This construction shows up three times on this page: lambda { I’m expecting it to look more like this: lambda { Am I off base here? | 2009-03-25 | ||
87 | SUGGEST | Right above “How They Work” heading: This will pass as long as user.in_role?(“admin”). How about: This will pass as long as user.in_role?(“admin”) returns true. | 2009-03-30 | ||
87 | SUGGEST | Last paragraph before section 9.4: How about changing “and so” to just “so” | 2009-03-30 | ||
95 | TYPO | 2nd to last paragraph: | 2009-03-25 | ||
96 | SUGGEST | The list on this page goes in roughly the order the topics were discussed, except the last two. Explicit came before implicit. | 2009-03-30 | ||
96 | TYPO | Last paragraph: | 2009-03-25 | ||
98 | SUGGEST | 2nd paragraph: | 2009-03-30 | ||
99 | TYPO | In code sample for person_test.rb (bottom): require ’ test/unit’ (extra space before ‘test’) | 2009-03-25 | ||
100 | TYPO | Last paragraph: | 2009-03-25 | ||
103 | TYPO | 2nd paragraph of section 11.2: How about: | 2009-03-25 | ||
103 | TYPO | In the code sample on line 6: describe(‘A Person’) # <label id=“code.lone_describe” I don’t understand what the “<label” comment is doing. It looks kinda like a malformed xml tag… | 2009-03-25 | ||
104 | TYPO | 2nd paragraph: How about: | 2009-03-25 | ||
104 | TYPO | Last sentence: How about: | 2009-03-25 | ||
105 | TYPO | 2nd paragraph: | 2009-03-25 | ||
106 | TYPO | Middle of page: How about removing ‘the’: | 2009-03-25 | ||
108 | TYPO | 3rd paragraph: | 2009-03-25 | ||
143 | ERROR | When running Cucumber to test after adding the model I get a complaint that the movies table does not exist: cucumber features/showtime_descriptions.feature:7 So that I can find movies that fit my schedule I am running Rails 2.2.2 and Cucumber 0.1.16. | 2009-06-21 | ||
113 | TYPO | Sidebar, 1st paragraph: How about: | 2009-03-25 | ||
114 | TYPO | Wondering how/whether this “—format colour” option is related to the “-color” option on the next page. Also, why does the spelling seem to alternate between ‘color’ and ‘colour’? Are they interchangeable? | 2009-03-25 | ||
116 | TYPO | The example at the top of this page, and the section heading on the previous page (115) show “-color” with one dash. The next example shows “—colour” with two dashes (and a different spelling). Farther down, an example shows it as “—color” Are the one-dash versions and two-dash versions interchangeable? Are the spellings interchangeable? If so, it would be helpful to say that. | 2009-03-25 | ||
117 | TYPO | 3rd paragraph: how about: (to distinguish the official repository (as it is called in the preceding paragraph) from the development (github) one. | 2009-03-25 | ||
118 | TYPO | 4th paragraph: How about: | 2009-03-25 | ||
119 | TYPO | 3rd paragraph: Doesn’t look like it from the above example. It looks like it tells us that they all failed (“No mutants survived”). | 2009-03-25 | ||
129 | TYPO | Last complete paragraph has three occurrences of “move onto”. Should that be “move on to”? | 2009-03-25 | ||
131 | TYPO | Top of page (sentence starts on previous page): How about: | 2009-03-25 | ||
131 | TYPO | In the “Using Rails config.gem” section, I’m confused by the part (3rd paragraph) that says, “you’ll need to setup your test environment to load the gems.” I thought the first paragraph of this sections said that by using this method you’ll have the gem loaded in all environments. So is it loaded in all environments or just the test environment? And, why can’t it be done for just the test environment? | 2009-03-25 | ||
133 | TYPO | 4th paragraph: 2nd ‘code’ sounds redundant | 2009-03-25 | ||
136 | TYPO | End of 4th paragraph: “specify it’s behavior” should be “specify its behavior” | 2009-03-25 | ||
136 | TYPO | Last paragraph: “it’s support for piggy-backing” should be “its support for piggy-backing” | 2009-03-25 | ||
137 | TYPO | 3rd paragraph: “added valued” should be “added value” | 2009-03-25 | ||
141 | TYPO | 2nd-to-last paragraph: How about: | 2009-03-25 | ||
141 | SUGGEST | End of page: Since the last paragraph introduces the —scenario option, how about showing the command using that option in the example that follows | 2009-06-21 | ||
141 | TYPO | Footnote 3: How about: | 2009-03-25 | ||
119 | SUGGEST | … and heckle 1.4.2 was released in 2009. My erratum is moot! | 2009-03-30 | ||
129 | TYPO | s/software the matters/software that matters/ | 2009-03-25 | ||
38 | TYPO | I think the line “Assuming that your monitor has more colors than this book, you can also add the –colour option…” should instead use a double hyphen…“—colour” | 2009-03-25 | ||
81 | TYPO | In the Arrays and Hashes paragraph on pg81, the first and second example looks to me to be incorrect. Should the two arrays in the second example be different or am I misunderstanding the intention? [1,2,3].should [1,2,3]
[1,2,3].should_not [1,2,3] Thanks, Iain Watt. | 2009-03-25 | ||
88 | SUGGEST | It seems the code example is aliasing the object predicate ‘can_drive_at_night?’ with :drive_at_night so just say that. As it is now the point you’re trying to make is not very clear. | 2009-05-29 | Explicit predicate matchers have been deprecated so the material in question has been removed. | |
64 | ERROR | The very last example on the page shows storing a value in the before and resetting it in the after. However the code shows two “before” functions - the second should be after. Ie. before(:each) do should be before(:each) do | 2009-03-25 | ||
11 | SUGGEST | There’s an existing example written: movie_list.empty?.should be_true A more idiomatic way of representing this would be: movie_list.should be_empty | 2009-02-23 | ||
56 | OK | I don’t like the example because it makes more sense to the implementors of rspec than to its users. A better example might be: it “should result in 3.325 < val < 3.335” do | 2009-05-28 | This is actually the example taken directly from rspec's codebase. | |
32 | SUGGEST | Your first version of the spec file is: require File.join(File.dirname(FILE), “/../spec_helper”) module Mastermind It’s good practice to include a stub for a test you know you’re going to need by making the example: require File.join(File.dirname(FILE), “/../spec_helper”) module Mastermind | 2009-03-30 | We cover that later - there is only so much information we can cover at one time, ay? | |
89 | TYPO | The line: expected #has_key?(:id) to return true, got false doesn’t format correctly (the syntax highlighter is confused) | 2009-03-25 | ||
112 | TYPO | The formatting of the output is using the wrong syntax highlighter (it shouldn’t treat the ‘#’ as a comment. | 2009-03-25 | ||
134 | SUGGEST | You should drop ‘RAILS_ROOT/’ from the directories - it’s what’s going to be naturally assumed by the reader and it’s inconsistent with other directory references. | 2009-06-17 | ||
138 | OK | Minor formatting problem - the first line of showtime_descriptions.feature is orphaned from the rest. | 2009-06-17 | Formatting issues like this will be dealt with when we typeset the book for print. | |
38 | SUGGEST | To be more consistent, replace (line #8) By doing so, you can also remove the “require ‘rubygems’” from your code. | 2009-03-25 | ||
23 | SUGGEST | The text reads “Steps are defined by calling any of three methods provided by | 2009-11-23 | ||
68 | TYPO | Text says " example grouip with theshared_examples_for“. Spelling error with ”group". | 2009-03-25 | ||
70 | ERROR | On the numbered list, showing the order the blocks run, item five should be outer after, not outer before | 2009-03-25 | ||
81 | ERROR | “[1,2,3].should_not [1,2,3]" this test will actually fail. I would assume you meant something like "[1,2,3].should_not [3,2,1]”. | 2009-03-25 | ||
82 | OK | What’s with the underscores in the number for the commission example? 250_000 and 7_500?? | 2009-05-29 | That's standard Ruby - try it. | |
31 | SUGGEST | The text shown for the cucumber features/scenarios is using ruby syntax highlighting. So words like “for” and “break” in plain-text phrases like “So that I can break the code” are highlighted when they shouldn’t be. I suggest using a different syntax highlighting. | 2009-03-30 | ||
57 | TYPO | “only moments a way” should be “only moments away” | 2009-03-25 | ||
54 | TYPO | In first paragraph at top of page, command for running the newly created codebreaker_submits_guess feature shows the file name as “codebreaker_submits_guess.rb” instead of “codebreaker_submits_guess.feature”. | 2009-03-25 | ||
50 | TYPO | In the feature narrative, it says: This should say: This same error is repeated on page 53, when this same narrative is shown again. | 2009-03-25 | ||
52 | TYPO | 3rd paragraph of ‘FIT’ sidebar: | 2009-03-25 | ||
53 | TYPO | In 2nd paragraph of feature narrative, same error as on pg 50 (‘guess’ in last sentence should be ‘secred code’) | 2009-03-25 | ||
54 | TYPO | 4th paragraph: | 2009-03-25 | ||
55 | TYPO | 3rd paragraph has three errors (that I noticed): actaully -> actually “complex enough where this brute force approach…” | 2009-03-25 | ||
59 | TYPO | 3rd paragraph, 1st line: | 2009-03-25 | ||
106 | TYPO | In lambda examples, :working_to_hard should be :working_too_hard | 2009-03-25 | ||
60 | TYPO | Start of section 4.3: How about: | 2009-03-25 | ||
61 | TYPO | 2nd paragraph: Should this be “the example on line 10.”? | 2009-03-25 | ||
62 | TYPO | 2nd paragraph: | 2009-03-25 | ||
64 | TYPO | 2nd paragraph: How about: | 2009-03-25 | ||
64 | TYPO | 2nd paragraph: How about: | 2009-03-25 | ||
66 | TYPO | 2nd to last paragraph: How about: | 2009-03-25 | ||
68 | TYPO | alogrithm -> algorithm | 2009-03-25 | ||
68 | TYPO | naive -> naïve | 2009-05-29 | both are in the dictionary and I think the publisher wants us to limit our overseas excursions to "behaviour" | |
126 | TYPO | “either revisit what you’ve already built or make due.” s.b. “either revisit what you’ve already built or make do.” | 2009-03-25 | ||
63 | ERROR | In game.rb: the expression | 2009-03-25 | ||
9 | TYPO | [sudo] gem install aslakhellesoy-cucumber —version “>= 1.1.99.21” | 2009-03-25 | ||
188 | TYPO | The first example should read: current_url.should =~ /vacation-photos/ | 2009-03-25 | ||
196 | TYPO | The first line should read: Let’s break down the spec: (breakdown is not a verb) | 2009-03-25 | ||
184 | TYPO | “with a couple reusable” should read “with a couple of reusable” | 2009-03-25 | ||
40 | TYPO | Should the below code work? ruby spec/mastermind/game_spec.rb —format specdoc It returns, no output for me. spec spec/mastermind/game_spec.rb —format specdoc great book, so, far. thanks | 2009-03-25 | ||
25 | SUGGEST | Need to describe the file naming conventions between the .feature file and the step definition files. | 2009-06-17 | ||
54 | TYPO | cucumber —require features features/codebreaker_submits_guess.rb Shouldnt’t that filename be codebreaker_submits_guess.feature ? | 2009-03-25 | ||
168 | TYPO | End of 2nd paragraph: | 2009-03-25 | ||
169 | TYPO | Last paragraph: | 2009-03-25 | ||
174 | TYPO | 2nd paragraph: “it’s genres” should be “its genres” | 2009-03-25 | ||
174 | ERROR | Looks like the example at the end of this page is failing when it shouldn’t be | 2009-06-21 | ||
176 | TYPO | 3rd paragraph: | 2009-03-25 | ||
176 | TYPO | 4th paragraph: | 2009-03-25 | ||
177 | TYPO | Looks like the last code sample should say “click_link” instead of “clicks_link” | 2009-03-25 | ||
181 | TYPO | 2nd to last paragraph: | 2009-03-25 | ||
182 | TYPO | Top: “text/plainMIME” should be “text/plain MIME” | 2009-03-25 | ||
183 | TYPO | 2nd paragraph: How about: | 2009-03-25 | ||
183 | TYPO | 2nd to last paragraph: | 2009-03-25 | ||
184 | TYPO | Last paragraph: | 2009-05-29 | ||
185 | TYPO | 3rd example regex: How about: | 2009-03-25 | ||
186 | TYPO | 4th paragraph: | 2009-03-25 | ||
187 | TYPO | 3rd paragraph: How about: | 2009-03-25 | ||
187 | TYPO | 3rd paragraph: How about: | 2009-03-25 | ||
188 | TYPO | 3rd paragraph: | 2009-03-25 | ||
23 | TYPO | “cd to the mastermind directory” where? So far the book does not suggest downloading the code or creating a directory. | 2009-06-09 | ||
20 | TYPO | “Figure 2.2, on the next page shows” — you need a comma after “page”, or no comma before “on”. | 2009-03-25 | ||
20 | TYPO | “By convention, we’ll build” doesn’t make sense. By convention, people build… so we will too. Or: Following convention, we’ll build… | 2009-03-25 | ||
24 | OK | It’s not clear what file the steps should be typed in. | 2009-05-29 | There's no instruction on page 24 to type it anywhere. Turn the page, however, and it's right there in the 1st paragraph. | |
29 | TYPO | Add “a” before “*nix user” | 2009-03-25 | ||
30 | SUGGEST | Doing split(/n/) only works because the first message includes “\ | 2009-09-15 | The implementation ends up using puts, so I think it works fine. Agreed that this might be fragile if we went in a different implementation direction, but all that would happen is that we'd get an unexpected failure and make the appropriate change. \n \nThanks for the tip though :) | |
9 | TYPO | cucumber installation version is wrong Given: Should be: 0.1.99.21 otherwise gem is not found | 2009-03-25 | ||
45 | SUGGEST | “Fowler talks about changing the behavior of systems…” This sentence is kind of red herring. He really talks about not changing it, and in any case, there’s no need to recap this. You’ve already summarized what refactoring is, so you can just go and ahead and do it. | 2009-03-30 | Changed to "changing the designs of systems ..." | |
45 | SUGGEST | Make up your mind about how to spell behavio(u)r. I know the Prag enterprise has a foot in both camps, but still :-) | 2009-03-30 | ||
52 | TYPO | “criteria” in the “FIT” sidebar should be “criterion” (or “is” should be “are”). | 2009-03-25 | ||
44 | TYPO | absolute line #12 reads with a the as_null_object( ) method: perhaps should read with an as_null_object( ) method: | 2009-03-25 | ||
64 | ERROR | “At this point all of the examples pass: ” I could be mistaken, but I don’t think there was ever an iteration where game#start actually saved the parameter “code” into | 2009-03-25 | ||
156 | TYPO | “it’s support for piggy-backing” should be “its support for piggy-backing” | 2009-03-25 | ||
172 | SUGGEST | Clarify a bit why the Webrat version is less coupled with the code. It still embeds form element names. It really doesn’t seem that the use of movies_path is the sole remaining implementation detail left. | 2010-01-16 | ||
158 | TYPO | The code example at the bottom of the page should not have a page break after the first line, especially since it masks the required indentation of the next line. | 2009-05-29 | These sorts of formatting issues will be addressed when we go to typesetting after the beta process is over. | |
198 | ERROR | TRUNC at end of line instead of: do |form| (in code block on bottom half of page) | 2009-04-05 | ||
193 | TYPO | 3rd paragraph of “A Big Misconception”: How about: | 2009-03-25 | ||
194 | TYPO | First line: How about: | 2009-03-25 | ||
196 | TYPO | 4th paragraph: How about: | 2009-03-25 | ||
197 | TYPO | 3rd paragraph: duplicate ‘to’ | 2009-03-25 | ||
198 | TYPO | Last line: How about: | 2009-03-25 | ||
201 | TYPO | Paragraph after 2nd code sample: We didn’t use a token “as_null_object” (or any variation on “acts as”) in the code. We just had “:null_object => true” | 2009-04-05 | #as_null_object is now introduced earlier in the book in the second MasterMind chapter | |
204 | TYPO | First line: How about: | 2009-03-25 | ||
205 | TYPO | 6th paragraph: How about: | 2009-03-25 | ||
205 | TYPO | 7th paragraph: How about: | 2009-03-25 | ||
208 | TYPO | I don’t understand why the responses here (and again on the next page) would contain the string “rendered form partial” | 2009-04-05 | This will be fixed in beta 4 with other code truncation fixes. Thanks | |
208 | ERROR | 2nd paragraph: Why would they be failing now? We just refactored the form to a partial. Shouldn’t they still be passing, because the form is still rendered when the view is rendered? | 2009-06-21 | ||
208 | TYPO | 2nd to last paragraph: How about: | 2009-03-25 | ||
209 | TYPO | 2nd paragraph: duplicate “in” | 2009-03-25 | ||
213 | TYPO | 4th bullet point: | 2009-03-25 | ||
147 | SUGGEST | “choose between the lesser of three evils” should be “choose among three evils” or “choose the least of three evils”. | 2009-06-21 | ||
139 | ERROR | 9 No mutants survived. Cool! | 2009-03-25 | ||
149 | TYPO | sidebar: | 2009-03-25 | ||
222 | ERROR | In Duck Typing subsection, | 2009-05-29 | ||
13 | OK | In 1.3 RSpec first code example mixed up “describe” and “context”. They are still first class spec’ing vocabularies? Did I miss someting? | 2009-05-19 | 0.9 was well over a year ago :) Over time, common use has moved towards using "describe" for the subject of the example group and "context" for the specific context for the examples. | |
114 | SUGGEST | “This example uses the specify( ) method instead of it( ) because specify | 2009-03-30 | Yes, first class members - disregard the 0.9.1 changes, which are well over a year old. | |
76 | SUGGEST | Using ActiveSupport’s test class, you can write: test “a > b” do etc. | 2009-03-30 | As of rails-2.2, yes. I added a footnote to that effect. | |
76 | OK | By far the most disconcerting magical object is whatever “should” returns. It would be good to explain that. What is the return value of should, and how is that object engineered? | 2009-12-06 | ||
222 | SUGGEST | I’d urge you not to perpetuate the idea that duck typing is about calling respond_to? It really, really isn’t, and that interpretation of it has haunted it for years. | 2009-05-29 | ||
15 | TYPO | Cucumber Seeds: JBehave libary => library | 2009-03-25 | ||
54 | TYPO | cucumber —require features feature/codebreaker_submits_guess.rb should be .feature | 2009-03-25 | ||
17 | TYPO | Was page 15 in B1.0: | 2009-03-25 | ||
106 | TYPO | team.working_too_hard.should throw_symbol(:working_to_hard) Should the symbol be :working_too_hard (two oh’s)? Occurs twice on this page. | 2009-03-25 | ||
146 | 146 | TYPO | Next-to-last sentence in 2nd paragraph of section 15.1 should read “… revisit what you’ve already built or make do” (not “make due”). | 2009-03-25 | |
153 | TYPO | Second paragraph under section 16.1 begins, “Like a good set of IntegrationTests…”. Need to de-wikify that. | 2009-03-25 | ||
163 | ERROR | Creating the model, movie.rb, without creating the migration as well might confuse new-to-rails readers. A gentle suggestion to the reader to script/generate the model, edit the migration, run db:migrate and db:test:clone (or at least a gentle reminder the first time) might help. | 2009-06-21 | ||
170 | OK | [Cut from the last para of 170 to the middle of 172] Reasoning: Skip the example of “what Rails provides out of the box.” You’re trying to make the case for webrat, so lead with that. It’s a bit jarring to read 2 pages of “what I don’t want to use.” | 2009-12-06 | We feel that it provides useful context. | |
35 | TYPO | On the last paragraph is a word missing: .. second, the Game needs a [???] to handle the messenger argument .. | 2009-03-25 | ||
68 | OK | One comma too much be before the closing and | 2009-05-29 | The comma there is optional, and without it has a tendency to make the last two items fell like a unit "b and w" instead of the last 2 options "b, and 2". | |
149 | TYPO | BDD is about writing software the matters | 2009-03-25 | ||
24 | TYPO | Ruby keywords are highlighted in this cucumber output (the next page, 25, has similar output without this problem) | 2009-03-25 | ||
24 | TYPO | Cucumber output shows snippets without anything in the bodies of the methods. In my output each has ‘pending’ in the body. Also, they are described in the output as “undefined steps”, not “steps pending”. I am using cucumber version 0.1.99.21 | 2009-03-25 | ||
25 | TYPO | 2nd line: “enter that snippet to it” | 2009-03-25 | ||
30 | SUGGEST | The feature file in the sample code has #START and #END comments, which also show up in cucumber’s output | 2009-03-30 | ||
31 | TYPO | “Now we see file and line numbers” | 2009-03-25 | ||
31 | ERROR | “Now we see file [names] and line numbers for the feature and scenario” I only see this for the scenario when I run cucumber — not the feature. | 2009-03-30 | ||
34 | ERROR | Wondering what the “require ‘rubygems’” line is doing here. It wasn’t in the example folder at 01/01, it’s not mentioned in the surrounding text, and my spec seems to run just fine without it. | 2009-03-30 | ||
45 | TYPO | Middle of page: How about: | 2009-03-25 | ||
66 | SUGGEST | Omit: “You know, the ones who know about CTRL-C, but don’t know about cat.” Keep it collegial. | 2009-05-29 | Collegial != dry. It's a joke. | |
61 | SUGGEST | Leads into “experiencing that gnawing feeling” with haste as a lot of readers are still puzzling over “should_receive()” before “guess()”. The paragraph about “the first three lines in the example” could be made softer and clearer. It’s the first significant break point. It should be softer and clearer. | 2009-05-29 | ||
157 | TYPO | Last paragraph of 16.2: The ‘automated’ part appears slated for the (as yet unwritten) chapter 18, not 17 | 2009-06-21 | ||
123 | TYPO | Missing line number: | 2009-03-25 | ||
40 | ERROR | Running Ruby 1.9.1 The following error is returned when sending puts() to the mock messenger: jon@bunt:~/Code/mastermind(master)$ spec -c spec/mastermind/game_spec.rb 1) Finished in 0.021702199 seconds 1 example, 1 failure | 2009-03-30 | Marking this fixed per #38275 | |
40 | ERROR | Disregard my previous tech error. It was due to passing a string rather than the mock. | 2009-03-30 | ||
170 | ERROR | Top: “The step passes because the Genre model and table already exist.” (because we said they do, just now?) | 2009-06-21 | ||
169 | TYPO | The step definition file we’re writing is called “genre_steps.rb” in the example at the bottom of this page. But on pages (at least including 170 and 172) it is called “movie_steps.rb” | 2009-06-21 | ||
147 | SUGGEST | Building from the models out to the views means writing code based on | 2009-04-05 | ||
56 | SUGGEST | The first paragraph in “Finding the Way Home” is a vague mess. Please be more specific when refering to the “destination”, the “example” or “this refactoring”. | 2009-05-29 | ||
56 | SUGGEST | The first paragraph in “Finding the Way Home” is vague because the reader is never explicitly told to add the code argument to the “should prompt for first guess” example. This isn’t an issue for people downloading the code examples, but can be for those whom choose to type the examples. | 2009-05-29 | ||
189 | SUGGEST | For the save_and_open_page description you should probably say that the .html is saved to RAILS_ROOT/tmp/ and is only opened automatically on OS X. | 2009-06-21 | ||
175 | ERROR | Assuming there is an automatically running script that produces the sample outputs in the book, the one on 174-175 fails because rake db:migrate hasn’t been run on the ‘03’ project in the ‘simulated browser’ section of the code samples. | 2009-06-21 | ||
146 | SUGGEST | It would be nice to know who talks here: “I once worked on an application …” | 2009-04-05 | ||
200 | ERROR | TRUNC at the end of the line instead of | 2009-04-05 | ||
204 | ERROR | First paragraph of “Semantics vs Syntax” -> “The spec also references elements with the IDs recent_messages and message,[…]” -> recent_messages and message are classes, not IDs. | 2009-04-05 | ||
11 | TYPO | …To put this into perpsective, perhaps a brief exploration… In third paragraph. | 2009-03-25 | ||
56 | SUGGEST | I agree with suggestion #38294. I am typing the examples as opposed to downloading the code samples, and I don’t know what the “destination” you refer to is. Which example don’t I need to copy? | 2009-05-29 | ||
70 | SUGGEST | If you’re reading the book sequentially and you’re not familiar with BDD terminology, it’s difficult to understand the relationships between features, scenarios, examples, and step definitions when working your way through Part 1. Could there be a chapter beforehand that explains these things in detail? I’m not only new to RSpec and Cucumber, but also to BDD in general. A framework-agnostic explanation of BDD and its terminology, would go much further in helping me understand what RSpec and Cucumber are doing. | 2009-12-22 | ||
35 | ERROR | This page states “Running features/codebreaker_starts_game.feature gives us a different error now:” The error that is actually received is “undefined method `start’ for # not | 2009-07-04 | Justin - are you sure you had everything hooked up per the instructions? That output is generated by running the code. | |
54 | TYPO | the command “cucumber —require features features/codebreaker_submits_guess.rb” should instead be “cucumber —require features features/codebreaker_submits_guess.feature” | 2009-03-30 | ||
54 | TYPO | When I try to run the codebreaker_submits_guess.feature using this command: I get the following output: I copied the code for the codebreaker_sumbits_guess.feature directly from the code provided in the PDF. | 2009-03-30 | ||
44 | ERROR | The Null Object Pattern was mentioned and given the GOF book reference. The GOF book does not mention this pattern directly (I can’t find it). But other books that I have like Refactoring by Fowler or Refactoring to Patterns by Kerievsky does. | 2009-03-30 | Great catch! It's actually from Pattern Languages of Program Design 3, by Robert C. Martin and Dirk Riehle and Frank Buschmann. \n \nFixed. \n \nThanks! | |
52 | TYPO | s/repetative/repetitive/ | 2009-03-30 | ||
15 | 15 | TYPO | At the end of the first paragraph inside the “Cucumber Seeds” outset, “library” is misspelled as “libary”. | 2009-03-29 | |
181 | 182 | ERROR | Rails.root.join(“spec”, “fixtures”, “vacation.jpg”) cause problem w/ Rails 2.3. So, use File.expand_path(“vacation.jpg”, “#{Rails.root}/spec/fixtures”) or other method returns String or fix Rails( #2264 on rails.lighthouseapp.com) | 2009-05-29 | |
22 | OK | “Although the narrative is free-form, we generally follow a variation of the Connextra format described in the (as yet) unwritten sec.narrative.” Describing, or defining what the Connextra format is might be helpful to some readers. While familiar with user stories, using this term to describe the format was new to me. A little Googling solved that, but I’m still not clear on what sec.narrative refers to. | 2009-05-29 | It's already written, just not in a chapter that we've published in beta yet. Coming soon .... | |
53 | ERROR | “Scenarios: all colors correct …” The current version of cucumber does not support this syntax, I had to replace Scenarios with Examples and remove the “all colors correct” part to get it to work. | 2009-03-30 | ||
173 | SUGGEST | “… To get this step passing we’ll need a MoviesController” … It would help you describe the step to take to create this controller. | 2009-06-21 | ||
0 | SUGGEST | Before trying the samples, I did a clean rails install. This installed 2.3 . And some of the samples (don’t exactly remember) don’t work with 2.3 (possibly due to the in progress of the git versions of cucumber, and rspec). Maybe it is best to specify the rails version when creating the rails project. | 2009-06-22 | ||
181 | SUGGEST | In the description of attach_file, there is all of a sudden the mention of “Photo”. I took me a while to figure out how it relates to the form field. An example form would be nice here. | 2010-07-21 | ||
163 | TYPO | ./script/cucumber features/showtime_descriptions.feature:7 Doesn’t work, most probably because I use Postgres and didn’t migrate to the db!? Is the migration of the movie model missing? | 2009-06-21 | ||
96 | TYPO | In the phrase, “and self is the result object.”, “result” should be styled like code. | 2009-03-30 | ||
28 | OK | The big gray block divides up the code example. This makes it difficult to read the code. | 2009-05-29 | Typesetting issues like this will be addressed before we go to print. | |
198 | ERROR | “The example will still be failing, but you should see another familiar error message: MissingTemplate. Go ahead and implement the new.html.erb template.” But we just added the template file at the end of the last page (198). Since I have that template already, but it’s blank, the error I’m seeing now is: 1) Finished in 0.082394 seconds 1 example, 1 failure | 2009-04-05 | This issue was with webrat/nokogiri IIRC, and it is fixed as of rspec 1.2.2, rspec-rails 1.2.2, nokogiri 1.2.3, and webrat 0.4.3. | |
198 | ERROR | This line from the code example is causing a failure for me: response.should have_selector(“form[method=post]”, :action => messages_path) do |form| … 1) Finished in 0.088844 seconds 1 example, 1 failure When I remove the second argument, it passes (after making the other fixes mentioned this in the section) but still warnes about using a deprecated feature: response.should have_selector(“form[method=post]” + … Nokogiri::CSS::Parser.parse is deprecated, call Nokogiri::CSS.parse() Finished in 0.087327 seconds 1 example, 0 failures | 2009-04-05 | This was an issue with webrat which was resolved in 0.4.2. | |
200 | TYPO | The new “should render a text field for the message title” example passes when it should fail. I’m guessing this change to Nokogiri probably has something to do with that: (http)github.com/tenderlove/nokogiri/commit/13db61b3a028bf64ea94f957b4fc05bd0ecb9337 | 2009-04-05 | This is not an issue with webrat 0.4.3 and nokogiri 1.2.3. | |
207 | ERROR | In the “” example I had to turn a line into this to get it to pass: response.should have_selector(“form[method=post]” + (among other things, message_path became messages_path) | 2009-04-05 | The truncated code examples have been fixed in the views chapter. It should now display the full line of what is to be typed in. | |
208 | ERROR | “Now that we’re done refactoring, we can go back into spec-driving mode and add an example to edit.html.erb_spec.rb that expects the edit template to render the form partial” This seems to imply that this file already exists at this point, but I’m pretty sure it doesn’t. | 2009-04-05 | ||
208 | ERROR | “Run that spec, watch it fail, and update edit.html.erb to render the partial” I don’t think edit.html.erb exists yet either… | 2009-04-05 | ||
210 | TYPO | “With the shared example working let’s remove the original examples which ensured the for m partial was being endered. The new.html.erb_spec.rb should look like:” but we already removed these back on page 208: “If you run new.html.erb_spec.rb now, you’ll see four failing examples. These are the four that got copied over to _form.html.erb_spec.rb. Because those same examples are passing in the _form spec, we can safely remove them from the new spec.” (and I think there were only three, not four) | 2009-06-21 | The typo here is "examples" instead of "example." There is still one example remaining that specifies that the new template is rendering the partial. That's the one that should be removed. Typo fixed. | |
212 | SUGGEST | In the ViewMatches example, it isn’t apparent until the very end that we’re supposed to be doing any following along in the views_example application: “First, let’s add a line to require every ruby file in the spec/spec_helpers/ directory. This goes before the Spec::Runner.configure block:” By this point we’re a couple sentences from the end of the chapter. | 2009-04-05 | ||
195 | TYPO | ‘script/spec’ requires spec/autorun with latest rspec 1.2, use ‘rake spec’ instead | 2009-04-05 | This is fixed in the latest stable release of rspec and rspec-rails (1.2.2) script/spec should work fine. | |
162 | TYPO | In Joe Asks: “…provided by the spec-rails library”: change “spec-rails” to “rspec-rails” | 2009-05-29 | ||
163 | TYPO | Change “Cucumbers’s” to “Cucumber’s” in the first paragraph of Completing the Feature. | 2009-05-29 | ||
99 | TYPO | In “The cost of going Agile”, “..project delivery We’ve managed..” should not have a capital W. | 2009-03-30 | ||
102 | TYPO | “..to understand what that means first. so we work with the core..” Needs capital S in “so”, or a comma. | 2009-03-30 | ||
106 | TYPO | “..in response to being interacted with . This is useful for..” Extra space. | 2009-03-30 | ||
113 | TYPO | “Part of the rational for using mocks..” should be rationale, minus the extra space. | 2009-03-30 | ||
160 | TYPO | Duplicated code snippets; it looks like the second one is complete, but the first is partial. | 2009-04-12 | Doug - the first is the code in the feature file, the second is the shell output. They look mostly the same, but the shell output adds step definition snippets. | |
54 | ERROR | after adding the codebreaker_submits_guess.feature feature were told to run the command: cucumber —require features features/codebreaker_submits_guess.rb but the file is .feature not .rb so the command should be: cucumber —require features features/codebreaker_submits_guess.feature | 2009-03-30 | ||
24 | ERROR | Download link doesn’t exist. | 2009-03-30 | ||
24 | ERROR | There is a discussion of running the RSpec examples and having all (4 at that point) pass, but with the code that is viewable in the book, they will not pass. The linked code shows @code = code inside lib/mastermind/game.rb#start | 2009-04-12 | ||
178 | ERROR | The book states that webrat’s fill_in supports referencing form fields by id=, name= and | 2009-06-21 | That was a typo in the book - it's not id= and name=, but just id and name. Works with webrat-0.4.4 and rails-2.3.2. | |
316 | ERROR | Under Floating Point Comparisons | 2009-05-29 | ||
169 | OK | “within the contest of a single object” s/contest/context/ | 2009-05-29 | That chapter was released by mistake, and removed from subsequent releases. | |
24 | ERROR | Broken link to code download | 2009-03-30 | ||
19 | SUGGEST | You kind of jump right into things, without first suggesting that the reader does ‘rails mastermind’ ‘script/generate cucumber’ etc., maybe consider slowing it down in the beginning. | 2009-05-29 | The mastermind example is not a rails example, nor does it use any generated files. But I added Hello RSpec and Hello Cucumber examples (coming in the next beta), so that should help. | |
27 | OK | This story feels kind of out of place, I mean, it’s right in the middle of a code example. Perhaps move it so it’s not interfering with anything. | 2009-05-29 | Typesetting issues like this will be addressed before we go to print. | |
59 | TYPO | shouldn’t the lower game.rb example be expecting arguments? e.g. start(code) | 2009-03-30 | ||
31 | TYPO | The link of the code to bin/mastermind is broken. And is it suppose to be mastermind.rb? | 2009-03-30 | It's bin/mastermind. Should be fixed now | |
32 | OK | I don’t understand why we don’t want to use STDOUT or what it is. I started feeling a little lost on page 32. I’m not making the connection of what STDOUT has to do with cucumber. | 2009-12-06 | The book assumes a basic working knowledge of Ruby. | |
39 | SUGGEST | A bit of clarification needed on mock(“messenger”). I’m not sure if the object mocks a object of the class messenger or creates a mock object and gives it a class name of messenger or something else. I’m new so maybe my question is dumb but it’s unclear to me. | 2009-03-30 | ||
0 | SUGGEST | I think it’s a better idea to use a curly energy-saver bulb instead of an incandescent bulb on the cover, if possible :) | 2010-01-15 | ||
81 | SUGGEST | This sentence in the last paragraph could use some love: | 2009-03-30 | ||
82 | TYPO | In the mm/43 code example: @messenger.puts temp.sort.join should that line actually be(?): @messenger.puts temp.compact.sort.join | 2009-11-23 | ||
95 | TYPO | First line of “A brief history of Agile”: projcets | 2009-03-30 | ||
97 | OK | Link in the footnote isn’t active. | 2009-06-09 | Neil - I don't see a link on page 97 of Beta 3.0 - what link are you talking about? | |
217 | TYPO | In the epub book on iPhone, it displays as “Peanut butter & jelly” instead of "Peanut butter & jelly. So, it reads as to ensure “Peanut butter & jelly” is on the page, you’d type just that in the string, not “Peanut butter & jelly”. | 2009-05-29 | ||
228 | ERROR | I’m getting this error when run: > no such file to load — nokogiri/native | 2009-09-15 | ||
229 | TYPO | “spec/spec_helper.rb: This file is used load…” should be “spec/spec_helper.rb: This file is used to load…” | 2009-06-21 | ||
196 | TYPO | When I run the feature on page 196, I get the error below. The problem is that there is no table for movies. Did you want me to scaffold a model and rake the migration? I’m trying to following along step by step and it misses this.
$ cucumber features/showtime_descriptions.feature:7 So that I can find movies that fit my schedule Scenario: Show minutes for times not ending with 00 # features/showtime_descriptions.feature:7 1 scenario | 2009-06-21 | ||
23 | SUGGEST | The link provided to the code-breaker script is “Forbidden”. | 2009-03-30 | ||
32 | OK | “There is no application code yet, so we’re getting a NameError on Mastermind. Take a look at the backtrace.” What is a backtrace? | 2009-05-28 | A backtrace is an array of strings representing the lines of code that were executed leading up to an error. This is basic Ruby, which readers of this book are expected to have, so we won't be explaining it in the book. I'd recommend you read the Pickaxe book (http://pragprog.com/titles/ruby/programming-ruby) first | |
0 | SUGGEST | Wondering how the page numbers in this errata submission form should be handled when using formats like epub and mobi | 2009-05-29 | Please email this question to support@pragprog.com. | |
0 | TYPO | It’s hard to follow the provided code examples, in the sequence of numbered folders. How about a git repo for each of the main projects that book takes the reader through. Each step could have its own commit, and the reader could view it on github or clone it to their local machine and use tools like gitx to view it or play with it. | 2010-07-18 | I'm going to try to make this happen with the final release, but I can't make any promises at this point. | |
75 | TYPO | “This isn’t a very complex a problem compared to many …” | 2009-03-30 | ||
58 | TYPO | I think the last code snippet: should have been: | 2009-03-30 | ||
132 | TYPO | I found a couple of things in Chapter 10 tha kinda jumped off the screen at me. 132: The examples shown don’t match the text—Hash with 17 key/value pairs… hash.keys.length.should == 42. Next paragraph, they do match: Maybe I’m just being grumpy, but it bothered me as I read it. | 2009-06-17 | ||
136 | TYPO | 136: In the paragraph Since there are plenty of other examples that specify specifics about the error messages raised by message expectation failures, this example only cares that a MockExpectationError is raised. “specify specifics” seems awkward. | 2009-03-30 | ||
29 | TYPO | The code links are broken. Example: mm/04/features/step_definitions/mastermind.rb Kind regards, Ralf Waldvogel | 2009-03-30 | ||
77 | SUGGEST | Bottom of page: The nested contexts produce a confusing description: “with duplicates in the guess that match a peg in the code by color and position” Duplicate pegs in the guess can match a peg in the code by color, but by position? | 2010-01-15 | ||
78 | TYPO | Sidebar, 3rd paragraph: How about: | 2009-03-30 | ||
80 | TYPO | Last paragraph: How about: | 2009-03-30 | ||
83 | TYPO | Near bottom: How about: | 2009-03-30 | ||
95 | TYPO | Near top: | 2009-03-30 | ||
99 | TYPO | Last paragraph: | 2009-03-30 | ||
100 | TYPO | In the “Continual regression testing” subsection: How about “kind of feature” or “kinds of features” here | 2009-03-30 | ||
26 | ERROR | First: When /^I start a new game$/ do Then /^the game should say “([^\\”]*)"$/ do |arg1| The lines | 2009-06-17 | You're using a more recent version of cucumber than the one we wrote that material against. Discrepancies in the output will all be resolved before we go to print, but if we try to keep up with all those changes with every beta we'll never get the book done. | |
45 | OK | Does the name of the as_null_object( ) method come from the internal implementation? Or does it describe the external behavior? I would expect something like: ignore_additional_parts(). | 2009-05-29 | as_null_object() references the null object pattern, so that's the right name. | |
221 | ERROR | To set up HTTP headers in Webrat, the text suggests the following: Given /^I’m browsing the site using Safari$/ do On its own, this is not enough; you must also explicitly call headers in your request, e.g.: get ‘/’, nil, headers Then, all is well. Cheers, | 2010-07-21 | ||
29 | TYPO | In @game.start game is a local variable, so game.start will be correct. | 2009-05-28 | ||
25 | SUGGEST | Footnote about installation of packages should be moved to a ‘Preparing your ruby environment". I agree with other comments all this should be concentrated in one place. Ideally a ’rspec-book’ gem that always delivers the versions that related to the book no matter how the base gems evolve. Ideally this gem can be installed/uninstalled at will - without hosing your system as some dependency update/upgrade breaks your ‘dearest-project’. | 2009-06-09 | We added a Hello chapter (for beta 6) that has a section on installation and Hello RSpec and Hello Cucumber examples (i.e. Hello world). | |
23 | ERROR | Box: /subject-file with CTL+SHIFT+DOWN/feature-file with CTL+SHIFT+DOWN/ subject-file is a new notion. | 2009-05-29 | ||
23 | ERROR | End of sentence beneath box: This seems ambiguous to me. Did you mean “Stories went ‘out’, Features came ‘in’.” | 2009-05-29 | he description of Stories In, Features Out has changed and been moved to the Writing Software that Matters chapter. | |
25 | SUGGEST | Top of the page, code: Then the game should say “Welcome to Mastermind!” I think this could be more useful: Then the game should emit “Welcome to Mastermind!” The benefit is you save about 2 pages+ of convolutions trying to handle a shared step. This revealed nothing to me about Cucumber. In fact this shows the benefit of using Cucumber: It makes flaws patently obvious; 1) This game doesn’t ‘say’ anything (some do of course). 2) The two lines are fundamentally different. On the last point, would people be comfortable bundling a programs splash screen with a GUI dialog requesting user interaction? Or in the audible case, bundling as shared behavior/features the startup music with audible prompts requesting input? I was hoping this ‘straw man’ would reveal some Cucumber gold but at the end of a couple of pages…. | 2009-09-15 | Convention these days is "then I should see", which is what I changed both of these to. | |
22 | OK | You have given a directory tree for the RSpec tutorial. It is < Example: I am using NetBeans 6.5. It will create a standard Rails project with all the associated Rails directories. I created a Rails MasterMind project. Do these new directories go in the Rails Project root? E.g., Or do these directories go in their own << NON-RAILS >> project root directory where << NONE >> of the normally Rails’ associated directories are: Controllers, go? Can this Rspec/Cucumber system be installed in NetBeans? Or is this a recipe for complexity? Disaster? Not relevant to this book? Struggling with all the concepts and yearning for the best way to may Rails Really Sing!! Using NetBean 6.5 with Rails 2.3, Rspec and Cucumber gems installed. OS = Windoze Vizta. Thanks, Ken | 2009-05-29 | Why does everybody think this is a rails project? This is not a rails project. We'll add a better explanation of this. \n \nAs for NetBeans, IDE details beyond those supported directly by RSpec (i.e. TextMate) is outside the scope of this book. | |
22 | OK | Make it clear if this directory tree is << everything >> in the tree or is it a sub-tree in the RAILS project root directory with all those other RAILS dir’s. Maybe set it up completely separately from RAILS? (I suspect this will defeat the coding/compliance cycle) (See prior message for context.) Ken | 2009-05-29 | See comment for #38684. | |
25 | SUGGEST | You may wish to describe how this works in the common IDEs. NetBeans has great Project directory tree with the RAILS dir’s. Also a complete Files Tree showing ALL dir’s and files. I used e-textmate before. It also has good layouts. But is not as good a integrating gems, plugins and tools. Eclipse (Aptana) is similar. How about some details on how the IDEs handle Rspec/Cucumber. In NetBeans 6.l5 there already are a Unit Testing, RSpec set of directories and files. Do we keep using the RSpec NB tools? How to incorporate Cucumber into the NB gui? Thanks, Ken Wagner | 2009-05-29 | We're not including any material on IDEs in this edition of the book. | |
58 | TYPO | Running the examples should result in two failures not one. The example “should prompt for the first guess” should also be in error since the code is not passed to the start method in this example yet. The first time we see the code passed to the start method of this example is mm/27/spec/mastermind/game_spec.rb. | 2009-05-29 | ||
19 | SUGGEST | Have you thought about the issue of whether you’ll get flak from Pressman Toy for using the trademark Mastermind? Looks like the issue got raised in discussions about gnome-mastermind, too, but never went anywhere. | 2009-06-17 | We had not, but now that you bring it up, we have :) We'll be changing the name in the next beta (beta 7). | |
26 | ERROR | " In Cucumber, you get notification of a pending step, which you can think of as an undefined step. " actually, it seems (from both Cucumber 0.2.2 output and the book’s output) that you get notification of an undefined step, which you can certainly think of as an undefined step… | 2009-05-28 | ||
26 | ERROR | “and Cucumber gave us this snippet to get that started:” Actually, the snippet Cucumber gave us had “pending” in it; reading this, you might think you could just cut and paste the snippet from Cucumber, but you can’t. | 2009-06-09 | ||
29 | TYPO | "Here we store the return value of | 2009-05-28 | ||
29 | TYPO | @message is hyphenated. Not sure if there’s a rule about hyphenating code, but it feels wrong… | 2009-05-29 | Typesetting issues like this will be addressed before we go to print. | |
72 | SUGGEST | Immediately before Sec 4.5 you say it is not a good time to do exploratory testing. Then you go ahead and do it, concluding on p73 with a suggesting that exploratory testing was beneficial… “An interactive session with working software is worth a thousand meetings.” | 2009-06-09 | "Here's a hint: it's not" is in reference to whether the algorithm is complete. I've removed that statement, however, to avoid confusion. | |
25 | ERROR | Looks like Cucumber 0.2.2 is smart enough to know that “Then the game should say ‘.*’” will cover both of the last two steps! (neat.) | 2009-06-17 | ||
131 | SUGGEST | RAILS_ENV=test rake gems rake gems | 2009-06-21 | ||
56 | SUGGEST | The first paragraph of “Responding to Change” could be more explicit - perhaps add something like: Our new Cucumber step-matcher needs Game.start() to accept an argument: the secret code. But our RSpec example assumes that start() doesn’t take any arguments. We don’t want to change two things at once, but we can’t fix one without breaking the other… can we? | 2009-05-29 | Thanks Jay - slightly re-worded, but your addition is now part of the book. Cheers! | |
92 | TYPO | “…and multiple failed attempts at decyphering the instructions in the release notes.” The preferred spelling is “decipher”. | 2009-05-29 | ||
59 | SUGGEST | At this point, the RSpec stories pass fine but the Cucumber feature “code-breaker starts game” fails because it does not pass a code to Mastermind::Game::start. Is this intentional? | 2009-12-22 | ||
61 | SUGGEST | As Jesse posits above, I’m confused as to why “should_receive()” comes before the second “guess()”. Although, I just reread the paragraph about that code and it makes sense now, I missed it the first time. Maybe it could be made clearer? I can imagine why a mock object needs to know about the expectation before the call, but I also think it would help if this paragraph was expanded just a litte. | 2009-05-29 | ||
188 | SUGGEST | Isn’t a full page for a screenshot of the rails project tree a bit generous? Couldn’t be represented as a diagram, and to keep it consistent with the tree shown for the Mastermind game at the beginning of the book? | 2010-07-21 | ||
196 | SUGGEST | Perhaps remind the reader that they still need to create and run in the migration for the movies table to support the Movie class. | 2009-06-21 | ||
88 | OK | Is chapter 6 really necessary? Up until now it’s been a great tutorial/technical work on BDD using RSpec and friends and now it turns into a fluffy management book. If anything, this might make a good introductory chapter but I’d rather see more time given to BDD! The audience (developers) reading this book would already be sold on agile, otherwise they wouldn’t even be investigating BDD or TDD! | 2009-05-29 | Absolutely necessary, as it sets up the next chapter which wasn't published until beta 4. | |
21 | ERROR | For example, in this chapter we’ll describe the behaviour of Game in spec/mastermind/game_spec.rb and we’ll put its This sentence is in Chapter 2. States this will happen in Chapter 2. Error: Doesn’t happen until Chapter 3. | 2009-05-28 | ||
32 | OK | Running “cucumber features” yields summary lines of: The book says it should be: 1 scenario “1 passed step” vs "2 undefined steps. Here is total STDOUT from “cucumber features” Feature: code-breaker starts game Scenario: start game # features/codebreaker_starts_game.feature:6 1 scenario You can implement step definitions for missing steps with these snippets: Then /^the game should say “([^\\”]*)"$/ do |arg1| | 2009-05-29 | We're going to do our best to have all of this up to date before we go to print, but Cucumber is changing VERY fast right now and some of the output may not be correctly reflected in the book. Our priority is going to be on the code you write, rather than the output. | |
17 | SUGGEST | Wording on the flow chart is awkward. “Repeat #2 - #7 until Scenario is passing” perhaps should mention “and the code is as simple and expressive as it can be” or something similar. “Repeat #1 - #7 when Scenario is all passing” perhaps should say “for each scenario in the current story” or something like that. | 2009-05-29 | Agreed it was awkward, but I went in a different direction as for changes. The refactor steps already imply "and the code is as simple and expressive as it can be" and the "current story" context really suggests a 3rd cycle at a higher level. | |
25 | OK | Cucumber does not check the correspondence of the sequences in “features/codebreaker_starts_game.feature” and “features/step_definitions/mastermind.rb” so that if one file has “../^I am not yet playing$/..” the result of cucumber remains “1 scenario after adding the mistyped entry in “features/mastermind.rb” Would it not be better if cucumber flagged the mis-correspondence? Or flag the “Given …” in the mastermind.rb file as either an orphan (not found in the “.feature” file) or not matching the “step_definition” file. I found this oddity while experimenting with the “Given” entries. in the | 2009-05-28 | Please make cucumber feature requests in the cucumber tracker: https://rspec.lighthouseapp.com/projects/16211 | |
27 | ERROR | my output to the first step added (page 26) indicates 1 pending step and not 1 passed step as the PDF book says on page 27 | 2009-06-09 | ||
1 | OK | have a way for us to indicate what our environment is at this stage as we are submitting a suggestion/error… and save it so that we do not have to update but can update it if it changes. | 2009-05-29 | Please email this suggestion to support@pragprog.com. | |
270 | TYPO | first full paragraph, change “hard understand” to “hard to understand” | 2009-05-29 | ||
251 | SUGGEST | the last sentence on pdf p.251 mentions a familiar error and instructs reader to create new.html.erb. On the next page, it instructs the reader to add a route, then goes into a more detailed version of creating the new.html.erb MissingTemplate error. Methinks the first reference should be removed. | 2009-06-21 | ||
182 | TYPO | Last sentence of the page: " We’ll go over the the | 2009-05-29 | ||
184 | ERROR | In the second paragraph, you mentioned an error message, but what follows is the code for defining a custom matcher with custom failure messages (which is introduced in the next paragraph). "In the event of a failure using should_not( ), the generated message would read like this: Spec::Matchers.define :report_to do |boss| | 2009-05-29 | ||
186 | TYPO | First sentence of chapter 15.4: “Custom matchers can help us to build up domain-specific DSLs for | 2009-05-29 | ||
271 | ERROR | “The spec should now be at 2 examples, 0 failures, 1 pending.” -> not if you are using Rails 2.3.2, it will fail with the following error message: “Missing template messages/create.erb in view path app/views” | 2009-06-22 | ||
287 | TYPO | You pasted the wrong code example on the bottom of the page (the same as on page 288 -> “rails_controllers/messages/14/spec/controllers/application_controller5_spec.rb”). | 2009-06-22 | ||
131 | ERROR | I note that the rspec-1.2.2 docs recommend using “failure_message_for_should” rather than “failure_message”, and “failure_message_for_should_not” rather than “negative_failure_message” … see preamble for module Spec::Matchers | 2009-06-09 | ||
140 | TYPO | Procs referring to method working_too_hard? need a question mark at the end to match the actual name of the method. Currently written as lambda{team.working_too_hard} but should be lambda{team.working_too_hard?} | 2009-06-17 | ||
85 | TYPO | “Instead of getting bbbw, we get bbw.” Shouldn’t this be “Instead of getting bbb, we get bbw”? The pending example which was just unpendinged expects ‘bbb’. Unless I’ve made a mistake? | 2009-12-22 | ||
279 | TYPO | In the second sentence of 23.2, there ist a duplicated “to”. | 2009-05-30 | Ironic, that. | |
287 | ERROR | There seem to be some missing steps in getting to green with the ApplicationController spec. The code from the tgz download shows that the ApplicationController needs to ‘rescue_from AccessDenied, :with=>:access_denied’ and define an access_denied method on ApplicationController in order for the “redirect to 401.html” example to pass. This step does not appear in the body of the book. As given in the book, the example continues to fail with an uncaught AccessDenied exception. | 2009-06-22 | ||
58 | OK | Not sure if a note about this is worth including in the book, but while doing the Mastermind demo I twice made the same mistake: I accidentally left off the ‘w’ in the w[] constructions in the specs. This resulted in confusing errors, since[r g y c] == ‘r g y c’. | 2009-05-29 | I don't think we can really try account for everybody's typos. We've got enough of a challenge dealing with our own ;) | |
139 | ERROR | This doesn’t really matter since the point is just to demonstrate the throw_symbol matcher, but doesn’t the first implementation of working_too_hard? already short circuit? The method returns as soon as it finds anyone who worked for more than 50 hours. How is this a “perfect case for using throw/catch”? | 2009-12-23 | ||
237 | TYPO | Looks like there’s an extra paragraph break at the bottom of the page between “:nth-child pseudo-class,” and “giving it lots of flexibility.” | 2009-06-22 | Formatting problems like this will be addressed when we're ready to go to print. | |
215 | ERROR | When following along with the steps in this chapter, creating the movie.rb file as listed on this page doesn’t immediately make the Cucumber scenario pass, as shown on the next page. The reason for this is that there isn’t a movies table in the database yet. Cucumber reports the following: Feature: Showtime Descriptions Scenario: Show minutes for times not ending in 00 1 scenario In order to get this working, there needs to be another step to create and run a database migration that will make the movies table and give it showtime_date and showtime_time columns. Running the model generator (script/generate model Movie showtime_date:date showtime_time:time) would suffice for creating the migration, and as an added bonus, also creates an empty movie.rb file for the model definition. Run the migration (rake db:migrate), clone the production database to the test database (rake db:test:clone), fill in the details in movie.rb, and then Cucumber reports a passing scenario. Of course, adding all this migration and database stuff detracts from the simplicity of the example. The credo as I’ve understood it so far in the book is to implement as little as possible to get a scenario to pass, and generating and running a migration seems like a larger chunk of work than I’m used to seeing in the code found earlier in the book. Then again, Rails has more complicated dependencies than a bare-bones Ruby app, so it might be necessary here to bite off a larger chunk. | 2009-06-21 | ||
288 | ERROR | Code example 5 for application controller failing with: Sorry if this is something I’ve done — I’ve tried to see if it’s my fault & not spotted it. | 2009-06-22 | ||
227 | ERROR | The code listing for ‘simulated_browser/03/out/01.all_passing’ isn’t a passing scenario at all. It has a failing step with the following error: Could not find table ‘genres’ (ActiveRecord::StatementInvalid) | 2009-06-21 | ||
254 | ERROR | For the 3rd example you neglected to mention that you have to update the form to include <%= f.test_area :text %>. Of course running the spec told be it was missing, but you should be consistent. | 2009-06-21 | ||
66 | SUGGEST | It would be nice if the book would be Ruby 1.9 safe. the code in the guess method is the first instance I’ve seen which isn’t. It iterates over the guess string with each_with_index, but in 1.9 Strings are no longer enumerable. So something like guess.split(“”).each_with_index … might be in order. | 2009-06-09 | Ignoring, per Rick's request in #39009 | |
73 | ERROR | First ignore my earlier erratum #39008 I’d lost track of what was being passed to guess. Than said, in order to getht app to work, I had to change it to: #!/usr/bin/env ruby without the chomp the newline is part of the guess without the “” argument to split, with a guess of “cyyg” it passes | 2010-01-15 | ||
301 | ERROR | In the list of of built-in expectations, the definition of be_close is incorrect. actual < (expected + delta) or > (expected - delta) The OR should be an AND. actual.be_close(3, 0.5) actual < 3.5 OR actual > 2.5 passes for any numeric value. what you really want is: 2.5 < a < 3.5 | 2009-06-09 | ||
203 | OK | I’m not sure why the ‘Bundling in vendor/plugins’ section splits the two vendor/gem sections. I would consider merging the ‘Bundling in vendor/gems’ section with the ‘Using Rails config.gem’ section and introducing the [sudo] rake gems:unpack:dependencies RAILS_ENV=test command earlier - as it is a powerful and elegant way to manage and freeze an applications gems. | 2009-06-21 | We see them as two separate approaches. | |
203 | ERROR | Unpacking webrat (and nokogiri) breaks cucumber. “Because webrat (and nokogiri) are native gems, that is, they are built locally on your machine based on its architecture, we won’t unpack those.” | 2009-06-21 | ||
123 | OK | share_examples_for should be shared_examples_for (also on p.122) | 2009-05-29 | Actually, shared_examples_for is an alias for share_examples_for, which is the preferred method. | |
68 | ERROR | The spec output in the middle of the page only appears that way if using —format nested, which has not been described. | 2009-06-22 | ||
111 | ERROR | —nested should be —format nested (at least in rspec 1.2.2) | 2009-05-29 | ||
137 | ERROR | The example at the top of the page (beginning with “agent.commission.should == 0”) is actually testing more than the prior example (which ends “should change{agent.commission}.by(7_500)”) because it is testing the starting value of 0, where the rspec example is only testing the difference between the starting and ending values. Yet the text claims the two examples “express the same thing”. | 2009-06-21 | ||
142 | ERROR | field.players.collect — shouldn’t that be .select? | 2009-06-17 | ||
142 | ERROR | 142 says that “home_team.should have(9).players_on(field)” will call home_team.players_on(field). (At least, that’s how I read it.) But back on p.136 it says players_on_the_field() and key_value_pairs() are sugar and not even evaluated. How are these different? Why isn’t team.players_on_the_field called? | 2009-12-23 | ||
186 | ERROR | class ReportTo is missing its ‘end’ | 2009-05-29 | It's actually there, but it landed on the top of the next page. \n \nThese sorts of formatting issues will be addressed in typesetting. | |
186 | SUGGEST | Is does_not_match? (if implemented) called instead of matches? for should_not? Or in addition to matches?, somehow? The text isn’t clear. | 2009-05-29 | ||
235 | SUGGEST | set_hidden_field() could be used to simulate hack attempts, to make sure the app is resistant to such attacks. | 2010-01-16 | ||
236 | SUGGEST | reload — if, after a form submission, the response is a redirect, will webrat really resubmit the form? Because I don’t think that is normal browser behavior. It will simply reload the target of the redirect. | 2010-01-16 | ||
237 | SUGGEST | Is contain() sophisticated enough to distinguish between content that will be displayed vs html comments, tag attributes, javascripts, and the like? Seems like, generally, matching invisible content is not what is desired here. | 2009-06-21 | Yes, it is. Have you tried it? | |
215 | ERROR | I’m on windows XP sp3, rails -v 2.3.2, cucumber 0.3.1, rspec(-rails) 1.2.5 and after I make the DB and run the tests I stiil get this error What I found out is | 2009-06-21 | ||
280 | TYPO | login_require() -> login_required() (last paragraph) | 2009-05-30 | ||
288 | TYPO | The description of adding after(:each) to reload routes appears after the code listing that already shows that code. | 2009-06-22 | ||
298 | SUGGEST | Is it really necessary to repeat every matcher for the “should_not” version? I think it just clutters up the chapter. | 2010-07-21 | ||
186 | OK | The macros section says how to write macros, but doesn’t discuss using existing macros. Is it suggested to install shoulda? rspec_on_rails_on_crack? Will there be examples in the final book? | 2009-06-21 | There are examples of each right on that page :) That aside, shoulda macros don't plug into rspec as of yet - though the matchers do. | |
270 | SUGGEST | The book says “Go ahead and create that class in app/controllers/messages_controller.rb”. Contrary to other cases in the book, just create a empty class does not work, it leads to failed examples with the message “Controller specs need to know what controller is being specified”. Instead of “Go ahead and create that class in app/controllers/messages_controller.rb” it should invite to create a real controller class. | 2009-06-22 | ||
251 | OK | it “should render a form to create a message” do describe “specifying nested elements” do | 2009-06-21 | I just ran that example and it passed. I'm using rails-2.3.2, rspec-1.2.6, rspec-rails-1.2.6 and webrat-0.4.4. | |
86 | SUGGEST | There are still other scenarios that do not pass. If you add these to your Scenarios, you will see the problem. Scenarios: dups in code and guess You may want to note that there are additional failing scenarios (at least refer back to the “Exploratory Testing” section). Perhaps suggest it as an exercise for the user to find additional failing cases and fix them in the same manner prescribed. | 2009-05-29 | ||
86 | SUGGEST | Ignore previous posting - the suggestions are addressed in the book. Reading more carefully would be helpful. | 2009-05-29 | ||
30 | ERROR | Text says: “Here we store the return value of (Loosing the @ from game.start.) | 2009-05-28 | ||
35 | TYPO | The text says: “Open up a shell and cd to the mastermind directory and run the game_spec.rb file with the spec command, like this: spec spec/mastermind/game_spec.rb” This is ambiguous, if “cd to the mastermind directory” means “cd to /spec/mastermind/” then that part should be dropped from the code following the spec command. | 2009-09-15 | ||
36 | SUGGEST | This page needs to explain each of the steps it takes. Why each file is requiring the other. Why each file is located where it is. The purpose of each file. The syntax of each line. | 2009-06-09 | ||
37 | TYPO | The text says “the Game needs to handle the messenger argument to the initialize method”. In this phrase, “handle” should be “hand”. | 2009-07-04 | ||
24 | OK | At the bottom of the page, I tried to copy the Feature:… and following three lines that spanned the page boundary but it ended up copying the footer and header as well. Might consider keeping the code together on one page? | 2009-05-29 | This sort of thing will be handled during copy-editing before we go to print. | |
286 | ERROR | The error given by the spec at this point, using rails 2.3.2, is not consistent with the text. The actual error reported is: ‘No action responded to index. Actions:’ | 2009-06-22 | ||
182 | TYPO | Duplicate word “the” in “We’ll go over the the | 2009-05-29 | ||
26 | TYPO | “To run the feature and see the result, cd to the mastermind directory in a command shell and run cucumber features -n.” I ran this in my own project. cucumber features -n cucumber -n features cucumber features ganesh:~ zim$ gem list * LOCAL GEMS* actionmailer (2.2.2, 2.2.0, 2.1.2, 2.1.1) | 2009-06-09 | Looks like -n got changed to mean something else. Use -s instead for now, and we'll get that updated in the book. | |
232 | TYPO | Shouldn’t the code samples at the top of the page be “fill_in …” instead of “fills_in …” | 2009-06-21 | ||
31 | OK | I think the example you use at the start of the book is two complex form a business case point of view i can’t relate to it and im a massive fan of cucumber. | 2009-05-19 | While I appreciate it may seem complex, this is the classic challenge of worked examples like this. Make it too simple and readers don't believe they can apply the concepts to "the real world." Make it too complex, and we loose the less experienced readers. \n \nBased on other similar feedback, I am going to be adding some material to explain the domain a bit more and take some more time figuring out the features to use for the first iteration. Hopefully that will clear things up for you. | |
128 | OK | The stubs in the example for the WidgetsController are reversed. it “finds the widget” stubs update_attributes msg, and it “updates the widget’s attributes” stubs the find msg. | 2009-05-19 | The stubs are correct. Those are there because they have to be for the examples to run. The things that are attached to the examples are the message expectations (should_receive), and they align correctly with the example names. | |
241 | ERROR | There is no Cucumber “—scenario” option (V 0.3.6) as mentioned on second last line and in footnote 3. To run a single scenario just specifiy the line number of it - as on page 242. | 2009-06-21 | ||
107 | TYPO | “enough is” Line 3 The text has a space but none appear due to the emphasis of “enough” | 2009-05-29 | ||
315 | ERROR | The code for testing the application controller is not working. I get this error: 1) | 2009-06-22 | ||
125 | TYPO | Statment.new should be Statement.new | 2009-05-29 | ||
242 | TYPO | You have the user download (or type in) a model file, but don’t show the script/generate to generate the empty model file, migration file and test files. Since Movie is derived from ActiveRecord::Base, the tests fail because the table cannot be found. It would be good to generate the new model with “script/generate rspec_model Movie” or even “script/generate rspec_model Movie showtime_date:date showtime_time:time” followed by “rake db:migrate” and “rake db:test:clone”. | 2009-06-21 | ||
16 | SUGGEST | In the “Joe Asks…” dialogue, you’re already supposing the reader knows what you mean by red/green. Maybe a couple of paragraphs and some screenshots to let the readers see what the process looks like | 2009-05-29 | ||
39 | SUGGEST | regarding #38350, I was having the same problem (getting undefined error vs. wrong number of arguments error). I went back through the book and the problem was that back on page 33, I didn’t actually copy the code for the mastermind script. I think I was a little thrown off by the line just before the code snippet “If we did that, the mastermind script might look like this instead:”. I think the word ‘might’ made me assume that this wasn’t the actual code and was just an example. I probably wouldn’t have posted this but it looks like at least one other person made the same mistake, so hopefully he sees this. | 2009-05-29 | ||
34 | ERROR | The book suggests to use Then /^the game should say “(.*)” $/ do |message| for the step definition for the last two acceptance criteria in the start game scenario. When I run cucumber features though it says that the definitions for those two criteria are undefined. What I had to do to get this working was to use cucumber’s suggested implementation, and insert the body of the book’s definition into it. So it ended up looking like this: Then /^the game should say “([^\\”]*)“$/ do |message| This seems to work. For some reason cucumber isn’t matching the regex provided in the book. I am using the 0.3.9 gem. | 2009-06-17 | ||
82 | SUGGEST | You say that we should not be refactoring in the red, and you provide a method (pending) to make this possible. But we are still in the red on the cucumber scenario. Is this something that should be addressed here? | 2009-09-15 | I made a more specific reference to RSpec code examples passing. | |
0 | OK | It might be worth mentioning somewhere not to “require ‘model_name’” (or any other rails classes) in your rails spec’s as this can cause classes to be loaded multiple times when more than 1 spec is run. | 2009-05-29 | There's really no way for us to cover all of these sorts of gotchas. | |
54 | TYPO | “For each peg in the guess that matches color” …should read… “For each peg in the guess that matches the color” | 2009-05-29 | ||
33 | OK | Remember some of us try BDD early in our journey to Railsdom as we figure “if we’re gonna learn Rails, we might as well learn best practice”. For this reason, p33 needs to explain:
| 2009-06-09 | The project at the beginning of the book is not a Rails project. | |
25 | OK | Following up on suggestion #37454, I think the directory structure and require statements are pretty mysterious and inscrutable from p. 25 forward. To some degree this hinges on how much you want to assume on the part of your readers, which is probably going to be explained in the not-yet-written preface. I realize that you’re not writing a textbook for rank beginners, but I do think you want to consider how much Ruby experience you’re assuming. I’m envisioning including this book/material in my Software Design and Development course that I’ll be teaching in the Spring, and for students transitioning from a Java-based Data Structures to a (potentially) Ruby-based Software Design and Development course, this sort of “magic directory structure” material is going to make my life more difficult. Consider, for example, p. 37-38 (PDF). In less than a page, we insert a whole bunch of require statements without any real sense of what we’re doing or why. In some cases, those requires are the only thing in the files, which seems super magical; why in the world does that accomplish anything? Sure, we can play along and type in the code and run it, but if we’re not pretty experienced with Ruby, it’s mostly voodoo rather than knowledge. (It’s like a “cool hack” with no comment or test code. It may “work”, but it doesn’t add much value to the project.) I understand that this is “How real Ruby is written”, but I’m concerned that this will really put off interested people that approach this with a sincere desire to better understand BDD, Ruby, RSpec, and Cucumber, but find themselves bogged down in smoke and strange incantations. | 2009-06-17 | I appreciate where you're coming from, but this is not intended to be an Intro to Ruby book. There is quite a bit more material that we'd have to cover if we were to start down that path. \n \nI did, however, add some explanation about the directory structure. Hopefully that will help. | |
44 | ERROR | with rspec 1.2.6 and cucumber 0.3.9 freshly installed, I don’t get the ‘undefined method ’include’’ problem - it appears that this is handled automatically. | 2009-06-17 | ||
29 | ERROR | my version of cucumber emits the snippet suggestion: Then /^the test_runner should say “([^\\”]*)"$/ do |arg1| rather than the snippet suggestions Then /^the game should say “Welcome to Mastermind!”$/ do Then /^the game should say “Enter guess:”$/ do perhaps this is intended to teach the refactoring process on a granular level, and was nice when I read through on my first pass. When I went back to go though and play with the examples, this became confusing, because my features and specs were failing (and passing) at different times, with different messages that the ones listed in the book. | 2009-06-17 | ||
29 | ERROR | my version of cucumber (0.3.9) emits the snippet suggestion: Then /^the test_runner should say “([^\\”]*)"$/ do |arg1| rather than the snippet suggestions Then /^the game should say “Welcome to Mastermind!”$/ do Then /^the game should say “Enter guess:”$/ do perhaps this is intended to teach the refactoring process on a granular level, and was nice when I read through on my first pass. When I went back to go though and play with the examples, this became confusing, because my features and specs were failing (and passing) at different times, with different messages that the ones listed in the book. | 2009-06-17 | ||
41 | TYPO | As you’ll see a bit later in this chapter (the word “in” is missing) | 2009-06-17 | ||
28 | ERROR | Running the command “cucumber features -n” results in a missing argument error. Running “cucumber features” does seem to work. | 2009-06-09 | ||
33 | OK | I found the discussion of the two different approaches to the design of the mastermind script distracting. I was concentrating on learning how Cucumber scripts are defined and then I got sidetracked into evaluating how the first version of the mastermind script violated the Single Responsibility Principle. Now because of design decision to pass STDOUT to Game.new() this affects the step definitions. At this point I haven’t even fully grasped the architecture of the mastermind program and how Cucumber interacts with it. It seems to me that any program that is to be tested with Cucumber must be designed as a API and a thin script which calls that API. Then the step definitions can call the API as well. This isn’t explained at the beginning of ch.2 so all that follows confuses me since I’m new to this testing game. | 2009-12-06 | ||
33 | SUGGEST | From the page: That could work, but let’s take a step back for a second. How are we going to invoke this?" There are two things being discussed here: 1) the emerging design of the application code and the step definition. It seems you are asking how we are going to invoke the step definition but that doesn’t make sense. | 2009-09-15 | ||
46 | SUGGEST | You should explicitly specify that spec be used to run the examples specified on the page. I mistakenly tried cucumber and was confused that my results didn’t match those of the book. | 2009-06-17 | Compromise - I specified that you should run the RSpec code examples - that should make it clear enough at that point. | |
284 | SUGGEST | Need to add a line like this in the before block: assigns[:recent_messages] = [] | 2009-06-22 | We do just a few paragraphs later. | |
38 | TYPO | The first line of env.rb in B5.0 has an incorrect number of ../ in it. It reads “$: << File.join(File.dirname(FILE), ”/../../lib“)” but should read “$: << File.join(File.dirname(FILE), ”/../lib“)” to execute `cucumber features` succesfully. | 2009-09-15 | I think you have the env.rb in the wrong directory. It belongs in PROJECT_ROOT/features/support/env.rb, which would require two "/.."'s to get back up to the project root. | |
79 | TYPO | Prior to Chapter 5, we had been using the code ‘r g y c’ as the secret code. In Chapter 5, it’s all of the sudden ‘r y g c’. Is that intentional? | 2009-12-23 | ||
86 | SUGGEST | “We just compact the array before sorting…” Might be helpful to add a few words, “We just compact the array before sorting and joining, which removes all nil’s from the array.” so those unfamiliar with compact know what it’s doing. Then again documentation is your friend. | 2009-06-17 | ||
93 | SUGGEST | “Planning phase: how many people, how long for…” Consider, “how many people, for how long,…” instead of “how long for”. | 2009-06-17 | ||
34 | ERROR | Perhaps this is a config error my end. But I’m new to Cucumber so I’m not sure. ’ But | 2009-06-17 | ||
72 | SUGGEST | The text says: “The messenger( ) and game( ) methods use a common Ruby idiom of initializing an instance variable if it does not exist, and returning the value of that variable like a standard accessor.” The text should explain why the messenger( ) and game( ) methods execute within each step definition even though there’s no code inside each definition to call them. Also the test should explain what idiom you’re referring to in particular. | 2009-07-04 | ||
74 | SUGGEST | The text says: “We moved the before(each) block to line 5, inside the outer -most describe( ) block. This makes it available to all of the nested groups, and therefore every example in this file.” This includes making it available to nested groups that didn’t previously use them, like “should send a welcome message” and “should prompt for the first guess”. The should explain whether: (1) The block is available to nested groups like “should send…” etc after refactoring, but “should send…” don’t use them, and if so why | 2009-12-06 | ||
24 | TYPO | It says: “On line 4, we assign the value of returned by”. It should say: “On line 4, we assign the value returned by” | 2009-06-17 | ||
59 | TYPO | The text says: “so require it file from lib/mastermind.rb” It should say: “so require the file from lib/mastermind.rb” | 2009-06-17 | ||
372 | TYPO | customer should be custom in “You can extract duplication and common patter ns in your model specs into customer macros…” | 2009-06-17 | ||
24 | SUGGEST | In first para at top of page. The font and layout for ‘gem install cucumber’ and ‘cucumber —help’ don’t follow your data-entry convention. | 2009-06-17 | ||
25 | SUGGEST | Between hello/1/spec/greeter_spec.rb and hello/2/spec/greeter_spec.rb the name of the variable holding the string has changed without explanation from greeting to message. | 2009-06-17 | ||
26 | SUGGEST | Section 2.3, first para. “Inside the hello directly, ” | 2009-06-17 | ||
50 | TYPO | Pull-out box, ‘Downloadable Files’ “..rather than just see it’s ultimate output” Apostrophe not needed - this is a possesive, not a contraction. Should be “see its ultimate output” | 2009-06-17 | ||
154 | TYPO | In “code example” paragraph: … reminds us that the writing them is a design and documentation practice … I think you mean … the writing of them is a design … | 2009-06-17 | ||
274 | ERROR | On pages 274-275 there is output listed from running “./script/cucumber features/browse_movies.feature” which indicates a failing step, but the text immediately after this on page 275 claims that the scenario is passing. | 2009-06-21 | ||
45 | TYPO | …it let’s us express… should read …it lets us express… | 2009-06-22 | ||
85 | TYPO | …This code is certainlly naive,… should read …This code is certainly naive,… | 2009-09-15 | ||
236 | OK | In the code example that starts on PDF page 235 there is a definition of a should_assign method: def should_assign(hash) it “should assign @#{variable_name} => #{model_access_method}” do Notice the definition of the local variable “expected”. At the bottom you specify that you expect assigns[variable_name] to be equal to the local variable “expected” which has been assigned a string just saying: “the value returned by #{model_access_method}” That means, if you use the should_assign macro like this: get :index do it will expect assigns[:projects] to be equal to “the value returned by Project.all” I believe this is one of the “weirdnesses” that is mentioned in the beta warning in the beginning of the book. :) | 2009-11-23 | That actually works. The text is supplied by the mock, and is there to provide a useful failure message. | |
35 | TYPO | “If the code-breaker indicates no, the Should this be: “If the code-breaker indicates no, the | 2009-07-04 | ||
39 | TYPO | “an interation planning meeting” -> iteration? | 2009-07-04 | ||
40 | TYPO | “Let’s go ahead and store this feature in file.” -> “in a file”? (All my previous submissions referenced the wrong page, sorry. I just realized the page #s are at top and not bottom) | 2009-07-04 | ||
270 | SUGGEST | The words “The step passes because the Genre model and table already exist” are misleading. “Create the Genre model and table already exist so the step will pass” would be more accurate. Instructions for creating the Genre model and table, even if in an appendix, wouldn’t go amiss. | 2010-01-17 | ||
1 | SUGGEST | I think the hello example is a fantastic example but speaking as someone who has onboarded a number of teams to BDD via nbehave i still think your book is to fast paced and complex and i think you need some real simple web examples. I like the book i love cucumber but i just think your book is aimed to high and the learnign curve it introduces is to steep. | 2009-07-04 | Thanks for your comments, Neil, but at this late stage, I don't think we can really do much about this. No matter where we target this, there will be some for whom this is too simple and some for whom this is too complex. | |
29 | SUGGEST | the-rspec-book_b7_0.pdf >> top of p29 says: No explanation provided why 2 skipped. Does it stop upon first fail? | 2009-07-04 | ||
98 | SUGGEST | “corresponding likelihood” over “companion likelihood” | 2009-07-04 | ||
100 | SUGGEST | “challenging edge cases” over “sinister edge cases” | 2009-07-04 | ||
100 | TYPO | “don’t mark against the same peg more than once in the code. Moreover,” over “don’t mark against the same peg in the code twice. And to make things even more complex,” | 2009-07-04 | I prefer this one as/is. | |
100 | SUGGEST | “don’t mark against the same peg more than once in the code. Moreover,” over “don’t mark against the same peg in the code twice. And to make things even more complex,” | 2009-07-04 | Duplicate of 39650 | |
105 | SUGGEST | “We’re now interacting with the desired internal structure” over “We’re now interacting with the structure we want internally” | 2009-07-04 | Again - personal preference, but I'm leaving this one as/is. | |
107 | SUGGEST | “before reading the next paragraph…” over “before reading the next paragraph.\\\ | 2009-07-04 | ||
108 | SUGGEST | omit (repetitive) “Before we move on though, were there any other defects in the marking algorithm that you found in your own exploratory testing? If so, add some new scenarios to reflect them. If they fail, drive out the changes on your own, trying to stay in the green as much as possible.” | 2009-07-04 | How is this repetitive? We only cover a couple of scenarios in the chapter and the reader may have discovered others that we didn't cover. This text invites the reader to step away and explore. | |
112 | OK | omit (juvenile) “(It’s nice to do this from time to time anyway—it helps | 2010-07-18 | ||
121 | SUGGEST | “Whether this is due to real understanding and value of Agile principles, or simply a marketing ruse, only time will tell.” over “Whether this is due to them understanding and valuing the underlying principles of Agile or simply a marketing ruse to dress up the same old tired processes is left as an exercise for the reader.” | 2010-07-18 | The book hasn't been through copy-edit yet. Wording issues like this will be addressed when we get there. | |
124 | TYPO | behaviour (from behavour) in Changing Existing Code | 2009-07-04 | ||
128 | TYPO | “your application [and it] has any potentially tricky integration points” | 2009-07-04 | Not sure about this one - doesn't make sense with the preceding "or your" | |
145 | TYPO | “significant impact [on] the way that we drive out code” | 2009-07-04 | ||
158 | TYPO | use singular ‘return’ in “method can take an arbitrary number of arguments and a block, and returns a subclass” | 2009-07-04 | ||
176 | SUGGEST | “A little bit cryptic, yes?” over “A little bit cryptic, no?” | 2009-07-04 | I think this is a bit cultural. In my experience, "no" is commonly used in this context. | |
177 | SUGGEST | ‘What we want to say is that “the result should equal five,” which is how we say it in English.’ over ‘What we want to say is that “the result should equal five.” Here’s how we say it in English: \\\ | 2009-07-04 | ||
183 | SUGGEST | “due to inconsequential formatting changes” is more readable than “due to some inconsequential changes to formatting,” no? | 2009-07-04 | Now you're making me laugh. In 39678, you suggested that ", yes?" would be preferable over ", no?" and now you say ", no?" here. \n \nAnyhow - fixed. | |
189 | SUGGEST | “While that does express our intention” over “While that does express what we’re trying to express” | 2009-07-04 | ||
41 | TYPO | The second sentence of the last paragraph on the page begins, “The seems…”. I believe the authors probably intended, “This seems…”. | 2009-07-04 | ||
51 | ERROR | When I run “cucumber features -s” at this point in the tutorial, both feature files are run, so I get much more output than the text describes (both “Feature: code-breaker starts game” and “Feature: code-breaker submits guess”). | 2009-07-04 | ||
56 | ERROR | “cucumber features -s” should be “cucumber features/codebreaker_starts_game.feature -s” to get the output described on this page. | 2009-07-04 | ||
82 | TYPO | The start method in the callout should have a code parameter. | 2009-07-04 | I see two instances of start() at the top of the page, both if which have the code argument. Are you sure you're talking about page 82 in beta 7? If not, please add a new erratum. Thanks. | |
91 | TYPO | The When /^I start a new game$/ do step got broken when the start method of Codebreaker::Game got a parameter, but it was never fixed in the tutorial and magically shows up on this page as already fixed! | 2009-12-06 | ||
203 | SUGGEST | “When something goes wrong it must be corrected” over “If something goes wrong it’s gotta get fixed” | 2009-07-04 | ||
213 | SUGGEST | “Please pay momentously” over “Please pay imminently” | 2009-07-04 | Leaving as/is | |
234 | TYPO | repetative ceremony | 2009-07-04 | ||
319 | TYPO | The second code listing, after ‘so go ahead and create that class in app/controllers/messages_controller.rb: [Download rails_controllers/messages/015/spec/controllers/messages_controller_spec.rb]’ at the end of the page shows the spec instead of controller code. | 2009-10-04 | ||
148 | TYPO | The text doesn’t match the code example: “We stub the save method…”, but the update_attributes method was stubbed. | 2009-07-04 | ||
251 | SUGGEST | Please clarify as to `set RAILS_ENV=test` and `export RAILS_ENV=test`. I don’t understand how they are useful, or why I should specify these lines in config/environments/test.rb. Actually it now seems like it’s intended for the command line. Follows fast upon the config settings. Maybe another sentence or two should help. | 2009-12-23 | ||
260 | SUGGEST | “They are also unlikely to catch bugs that a good set of model specs might have missed.\\\ | 2009-09-15 | ||
262 | TYPO | In the code listing for cucumber_rails/01/features/showtime_descriptions.feature, it says So that I can find movies that fit my schedule Shouldn’t those lines be swapped? | 2009-07-04 | Nope. There are different narrative styles for cucumber features - this will be made clear in the cucumber chapter in the final book. | |
248 | TYPO | In Figure 20.1, the RSpec loop back notation says “Repeat #3 - #5 for discovered, models, etc. until step is passing” This doesn’t really make sense - perhaps it should say “Repeat #3 - #5 for discovered controllers, controller actions, models, etc. until step is passing” This will then match more closely to the last bullet point on page 247. | 2009-07-04 | ||
250 | TYPO | Broken link in footnote to Github resource. | 2009-09-15 | ||
300 | DEFER | rspec-rails ActiveRecord::Error mocking For outside-in view specs it would be useful to see how to mock ActiveRecord errors, for example I want to implement it “should render an error message if errors are present” as part of my view spec, which I am amending after finding in a feature that I had no validation error messages showing up on the page to tell the user what they did wrong. Some general advice on mocking these complex objects (where you could just stub the action you know your view uses, error_messages_for() in this case, but that would be fragile if, for example, the view were changed to use error_message_for several times instead). | 2010-07-21 | ||
300 | SUGGEST | At the end of the page, you specify to “create the new.html.erb template” - however, you don’t indicate that any code needs to be added to that file (i.e. <% form_for …%>) before running the test again. For the “show.html.erb” sample (starting on page 297), you create an empty file, run the test, see it fail, and then fix that error. A user following along might think the same approach is being followed for this example. However, if you don’t add the code to new.html.erb, you won’t get the same errors shown in the book. (Specifically, you won’t get the “undefined method ‘spec_mocks_mock_path’…” error.) | 2009-10-04 | ||
141 | TYPO | Is “Internets” in the diagram meant to be serious or humorous? | 2009-09-15 | ||
187 | SUGGEST | I know it’s only an example, but I’m not sure if I’m following your working_too_hard? example. Doesn’t the first version of the method finish running once any person has been working more than 50 hours in any week, and therefore not need short-circuiting? (It may be worth mentioning that using .any? would be more idiomatic ruby, unless .each is unavailable) | 2009-12-23 | ||
131 | TYPO | Second sentence of section 11.3 should begin “Ask a stakeholder how…” instead of “As a stakeholder how…” | 2009-09-15 | "As" is correct - I added a comma after "story" to clarify the intent. | |
107 | TYPO | bbbw should be bbb | 2009-12-22 | ||
82 | TYPO | The definition of the start method should have the code parameter. I believe this is what Ed Ruder was taking about. the line: should be changed to: | 2009-12-06 | ||
82 | TYPO | Just under “A Small Change Goes a Long Way” we are instructed to run the feature again with: I get “no such file to load” error using the cucumber -r option here, but it runs fine with -s or no option. I am not sure if this is a typo, or if I am doing something else wrong. I did at least find it odd that the book begins using the -r option with no explanation of why we are doing so. | 2009-09-15 | Not sure why you were getting a no such file error, but we don't need the -r any longer so it's pulled from the examples. | |
284 | ERROR | “set_hidden_field ”user_id“, :to => @bob.id” is correct | 2009-07-17 | ||
180 | TYPO | In the box on Matchers is the following text: Given Dan’s penchant for “Getting The words Right”,… words has been written in lowercase, while the rest of the phrase is in Title Case. | 2009-07-17 | ||
249 | TYPO | In the sidebar, second paragraph “or other forms of visual aide” should be “or other forms of visual aid” Visual aid is the standard spelling. An aide is a person, so to say “forms of aide” is incorrect. | 2009-07-17 | ||
330 | TYPO | we gets -> we get | 2009-07-17 | ||
354 | SUGGEST | The last sentence in the page 354 “Not changing the controller…” is confusing to me and seems contradictory. | 2009-10-22 | ||
284 | TYPO | First full paragraph, missing space between text/plain and MIME Given text: | 2009-07-17 | ||
286 | ERROR | Last paragraph under the contain() heading. Reads: contain() will match against the HTML decoded text of the document, so if you want to ensure “Peanut butter & jelly” is on the page, you’d type just that in the string, not “Peanut butter & jelly”. Should say (I believe): contain() will match against the HTML decoded text of the document, so if you want to ensure “Peanut butter & jelly” is on the page, you’d type just that in the string, not “Peanut butter & jelly”. Also, the last double quotation mark is straight and not curly. Typesetting issue? | 2009-10-04 | ||
327 | ERROR | It says that the “xhr” method has one additional argument at the front, but in the example the action is missing. In the book you have xhr :get | 2009-10-04 | ||
331 | TYPO | First paragraph under the heading “Fixing what we broke” POSTS should be POSTs | 2009-07-17 | ||
262 | ERROR | It says, “Run that file with script/cucumber features and you’ll see that all of the steps are undefined, and that Cucumber has provided us with code snippets for all of the missing step definitions:”. However, the output says “uninitialized constant Movie (NameError)”. That means you’ve already created the step definitions, but you haven’t yet shown us the code. | 2010-01-16 | ||
268 | SUGGEST | This chapter is lacking an official “What we’ve learned” section like the others. | 2010-07-21 | ||
275 | OK | “to keep this example focused on the Simulated Browser style, we’ll leave the development of this code as an exercise for you.” Cheater! ;) | 2009-07-17 | :) | |
281 | TYPO | “In the above example, if we renamed the Movie class to Film, we’d have to change line 8 which uses the field id and line 13 which uses the field name, but line 3 would continue to work just fine.” Those line numbers aren’t visible in the text. | 2010-07-21 | ||
292 | TYPO | “Wrapping Up”: The other chapters used a phrase like “What We Have Learned” or something like that. | 2010-01-17 | ||
52 | TYPO | Third full paragraph on page 52: Note the “then then” typo. | 2009-07-17 | ||
254 | TYPO | features/environments/cucumber.rb should be config/environments/cucumber.rb | 2009-07-17 | ||
1 | OK | The ruby on the cover next to “The facets of ruby series” is extraordinarily pixelated in stark contrast with the rest of the otherwise high resolution cover. | 2009-07-17 | Thanks for noticing :) \n \nThis is a beta pdf!!!! This will naturally be addressed before we go final. | |
299 | TYPO | “the stub( ) method in the (as yet) unwritten chp.mockFramework” chp.mockFramework is written as chapter 12. | 2009-10-04 | ||
303 | ERROR | “act as_null_object” should be :null_object => true - or is there a .as_null_object method? and again on page 305 | 2009-10-04 | There is an as_null_object method, which is preferred. This has been resolved in the text. | |
222 | SUGGEST | rake -T | grep “rake spec” rake -T spec is equivalent but shorter. | 2009-09-15 | ||
33 | TYPO | “BDUF means desiging an application in significant detail before writing the first line | 2009-07-17 | ||
324 | ERROR | I’m getting: ./script/spec spec/views/messages/new.html.erb_spec.rb 1) Finished in 0.045964 seconds 1 example, 1 failure I don’t see where you changed routes.rb. I think you may have rearranged the code, and it doesn’t match the text. | 2009-10-04 | ||
326 | TYPO | It says “Update the before block to do that and re-run the spec. You should now have one example, zero failures.” That can’t be true. We haven’t put anything in the template yet. I think the code was rearranged, and the text is out of date. It says, “Run the spec. The example we just wrote should be the only failure. Go ahead and implement the view to resolve that failure:” I think that’s wrong too because the template is still empty. | 2009-10-04 | ||
327 | TYPO | “Run that, watch it fail, and implement the code in the view to make it pass.” It’s probably a bad idea to assume the reader will guess the code correctly. It’s probably better to always show the right code that he should enter. | 2009-10-04 | ||
329 | TYPO | “Once again we’ll build on the messages example we started with earlier in this chapter. We’ll start where we left off in Section 24.2, Mock Example, on page 324. We had just produced a new page” I don’t think you need to say that since it was just the previous section. Perhaps in an older revision, that section was further away. | 2009-10-04 | ||
334 | OK | “If you run new.html.erb_spec.rb now, you’ll see four passing examples, including the three we just copied to the _form spec.” Following along, I have 5 at this point: “should render a form to create a message” | 2010-01-17 | There are 5 altogether, but only 4 in new.html.erb_spec.rb | |
335 | TYPO | “Run that and you should see 3 examples, 0 failures.” I’m getting: 1) Finished in 0.107088 seconds 4 examples, 1 failure It’s because you haven’t asked me to update the form yet. On the previous page, you said, “Getting back to the _form partial, for it to be usable for both the new and edit templates it’s going to have to get a bit smarter. It’s going to need to render the for m’s action attribute to point to the messages_path( ) for a new record and the message_path(@message) for an existing record.” However, you didn’t show any changes to the template. | 2010-01-17 | ||
335 | ERROR | “Run that and you should see 3 examples, 0 failures.” Ah, I see the problem now. You never told me to delete “should render a form to create a message”. | 2010-01-17 | ||
335 | ERROR | “Now that we’re done refactoring, we can go back into spec-driving mode and add an example that expects the edit template to render the form partial. Go ahead and create a spec for edit with the following example:” You forgot to put all the require, describe, etc. stuff in the first code example for this new file. | 2010-01-17 | ||
24 | TYPO | Last sentence on the page reads: “If that happpened…” Too much P. | 2009-08-26 | ||
324 | SUGGEST | The last sentence of this page says to “go ahead and create the template” but it doesn’t specify how to create it. If I create an entirely blank template was done for the show template earlier in the chapter - I get the same error Shannon If you want folks to create the template differently than what was done earlier in the chapter I think you should be explicit as to how it should be created. | 2009-10-04 | ||
51 | TYPO | You say Now run cucumber features/codebreaker_starts_game -s from the project root, and you’ll see the following output: But the command requires the .feature extension for the codebreaker_starts_game feature to properly run… cucumber features/codebreaker_starts_game.feature -s | 2009-09-15 | ||
54 | SUGGEST | Instead of calling the step file just codebreaker.rb (which will make Textmate apply a ruby or ruby on rails template to the file… instead perhaps call it codebreaker_steps.rb so that Textmate will properly classify the file as a Cucumber steps file. This assumes of course that you’re on OS X, running Textmate and using the Cucumber textmate bundle… but still, allowing for that scenerio doens’t hurt anyone not using this setup, and it only helps those of us who are. I know you can switch the .rb to be whatever you want, including Cucumber steps… but that is a global setting and then all your normal ruby or ruby on rails files will be rendered in Textmate as Cucumber steps files too. The way the bundles interpret the language requires ‘steps.rb’ to be in the file name to automatically use Cucumber Steps as the template. At least that is how it works by default, you can of course change it with the bundle editor as I’m sure you’re aware. | 2009-09-19 | ||
90 | OK | when you run the 3rd context “with all 4 colors correct and 1 in the correct place” it fails because it’s expecting “bwww” but with how the code is setup so far it gets “wwwb” since the c char at the end is the only one that matches in place. The others are out of place so they generate the www first. | 2009-12-22 | Exactly. | |
318 | DEFER | The BD Rails: Rails Views chapter would benefit from describing how to mock/stub/place expectations on ActionView helpers, for example when using textile you may want to then It took me a few hours to find this, I think it is worth adding to the chapter as these view helpers are an external dependency and their behaviour (i.e. is the textile actually converted correctly for display) seems better suited to the Cucumber level. Speccing textilize’s behaviour should be done in RedCloth’s own tests, not the application tests. The minimum I would have found helpful is being told what to stub, it wasn’t clear whether it was @controller, the helper module, or as it turned out another object which makes MVC sense but isn’t mentioned in the literature. | 2010-07-21 | ||
372 | DEFER | It seems that testing the “validates_uniqueness_of” model validation is a bit tricky. Blogs and forums I’ve found have a number of suggestions, but they all seem to be “workarounds” to me. This topic doesn’t appear to be covered in the RSpec book (yet). I’d really like to see this topic covered. | 2010-07-21 | ||
25 | OK | Line numbers are getting selected when trying to copy and paste code example from PDF book page# 25. This is the block (with #s copied over): describe “RSpec Greeter” do There’s an earlier example on book page# 20 with the same problem but it’s not something you are asked to enter into a text file. | 2009-08-26 | Your PDF reader should have a column mode. On Preview on the Mac you get that by holding down the option key. | |
60 | SUGGEST | Currently written: Suggestion: Reason: | 2009-09-15 | ||
29 | TYPO | The code has a extra space character it should be (It is not visible in the pdf, I discovered it after copy&paste) | 2009-09-15 | I can't duplicate that experience (on Mac OS using Preview), and the space is not in the source code either, so there's nothing I can really do about it anyhow. Sorry. | |
56 | TYPO | Wrong line number (minor problem!) uninitialized constant Codebreaker (NameError) /IF/ you use the code providerd (cb/06), the line should be 15. The difference is due to the 8 comment lines. | 2010-07-21 | ||
61 | TYPO | Duplicated Perhaps you’ve you’ve heard that a 1-to-1 mapping between | 2009-08-26 | ||
318ff | SUGGEST | This whole chapter on RSpec in Rails Views seems outdated, only the very fist basic example works. Also, as I did not get any further with the examples as they no longer match the API and there are even missing steps in the description. Finally, I used the spec_scaffold generator - which anyways created most of the “steps” discussed in this chapter, but in much better detail and with better code, too. Maybe it would be more usefull to start with the generator (scaffold, controller or model), explaining what we get there, and then work into some more pracitically relevant example? | 2009-10-04 | ||
343 | TYPO | both code examples are for the spec, not for the controller described in the second part: class MessagesController < ApplicationController | 2009-10-04 | ||
344 | SUGGEST | Now the message text field is called “body”, while in views it was called “text”. Not important, but yet another point that makes the RoR chapters very inconsistent compared to the Codebreaker chapters. | 2009-10-22 | ||
365 | ERROR | The #new controller specs are fine, but the instructions for adding the controller’s method accordingly are missing: def new | 2009-10-22 | ||
174 | TYPO | “what the WidgetsControllerdoes”, missing space between words. | 2009-08-26 | ||
372 | ERROR | The first example in here does not work ‘out of the box’, because in the former chapter, the model was implemented ‘quick and dirty’ without adding the correct inheritance schema to it. Therefore, before running the first spec (“”should be valid with valid attributes"), app/models/message.rb needs to be extended like so: class Message < ActiveRecord::Base | 2009-10-22 | ||
373 | TYPO | After adding the 3rd spec, you write (again): Run the spec—4 examples, 0 failures, 2 pending. Wait a minute. We were Should be: …1 pending… | 2009-10-22 | ||
376 | ERROR | Adding the User.new to the before method isn’t good enough, because we never created the user table in the first place, and this time just adding the correct inheritance to the unfinished implementation isn’t doing the trick, either: with ActiveRecord: only “Class User\ I.e., first we need a migration for Users or, better, mock (not stub) the User: before(:each) do | 2009-10-22 | Great suggestion to use mock_model here. Thanks. | |
379 | SUGGEST | Just another point about keeping these three chapters on Rails MVC consistent: def create | 2010-07-21 | ||
379 | ERROR | Before we get started we need to add a migration for the User model 2) This should actually suggest to add a :name attribute as ID, to be consistent with what was suggested before in the Message model: class Message < ActiveRecord::Base | 2009-10-22 | The reference in the code to User.name is the name() method on the User class, not on its intsances. \n \nThe rest of this has all changed quite a bit for the next beta. | |
121 | SUGGEST | Up until now you use ‘context’ nested in ‘describe’ blocks. Now on this page, you nest a ‘describe’ block inside another ‘describe’ block. Then in chapter 13, Spec::Examples, you show more code examples that have ‘describe’ blocks nested within other ‘describe’ blocks and none that show ‘context’ blocks within ‘describe’ blocks. It is not until chapter 17 (p238), ‘Tools and Integration’, that you show another code snippet with a ‘context’ block within a ‘describe’ block. All this with out mentioning that ‘context’ is an alias for ‘describe’. This inconsistency may be confusing for the reader. My suggestion is either maintain the ‘context’ within ‘describe’ blocks throughout the book or explain earlier that they are interchangeable. | 2010-01-15 | ||
38 | TYPO | Top of the page, “The game will need generate a secret code” should be “will need to generate” | 2009-09-19 | ||
155 | TYPO | 2nd paragraph, 1st sentence. “At this stage you could be forgiven for be thinking” remove 2nd instance of ‘be’ | 2009-09-15 | ||
59 | OK | I can’t seem to get my specs scripts to execute in my preferred order. Within each script, execution flows as expected, but the order the scripts are themselves run seems to be outside my control. I’ve tried renaming my RSpec scripts with a numerical prefix so they sort in my preferred order, but this seems to have no effect on the execution order. If there is a convenient way to influence the execution sequence, I’d like to see that mentioned in the book. | 2009-12-06 | ||
108 | TYPO | but they have the wisdom to recognize quickly whether those changes are heading them in the right direction. Once they do, they typically back up to the last known good state This should read “in the wrong direction” otherwise it does not make sense. | 2009-08-26 | ||
44 | SUGGEST | The term “DRY” is not explained where it is first used. Text: Fortunately, Cucumber of fers a few dif ferent tools for DRY’ing things up (There’s something odd with the ff pairing and it’s coming across with that extra space when copied with Preview on Mac OS X. I left the space in there in case you want to take a look at that formatting too.) | 2009-08-26 | ||
31 | SUGGEST | “Iteration” not explained The term “iteration” is used very early on (first reference is p31 in b8_0) but not explained. There’s even an entire section titled “Planning the First Iteration” slightly later on but there’s still no explanation what this means in that section. Much later (p145) there’s a very brief reference to an iteration being an one or two week “mini-project” but no detailed explanation. I think it would help to explain up front, at least briefly, what an iteration (and other Agile terms used in the book) is for those not familiar with Agile development methodologies rather than waiting till later like in Chap 10. | 2010-07-20 | ||
49 | SUGGEST | Diagram of directory structure for codebreaker somewhat ambiguous what is a file and what is a directory. It’s a little confusing cause you don’t have a legend stating which “color” is a directory and which is a file. You can mostly figure it out just by the names and the structure except you have a grey “codebreaker” box in lib and a white “codebreaker” box in bin so for those two you might have to think: is the white one actually a file (but it doesn’t have an .rb extension like the other Ruby files) or is that just a “typo” and it’s supposed to be a directory to match what’s in the lib directory? You might want to put slashes “/” after the directory names or use some other method to better distinguish between directories and files. | 2009-12-21 | I added a / after the directory names. Thanks for the suggestion. | |
50 | TYPO | Page break in between code block at end of page 50. This code is split: Given /^I am not yet playing$/ do Makes it impossible to cut and paste and the entire thing in one go (yes I know it’s not hard to type “end” manually…) | 2009-08-26 | These sorts of issues will be dealt with when we typeset the book for print production. | |
60 | SUGGEST | Suggestion: change “$:” in spec_helper.rb code to $LOAD_PATH Using $: makes it look a little too “Perlish” :) You are using $LOAD_PATH in bin/codebreaker earlier on page 55 so you should probably at least make things consistent. | 2009-09-15 | ||
78 | TYPO | cucumber -r used for the first time but inconsistent with previous usage. In the previous usages of cucumber and features/codebreaker_submits_guess.feature the command line was just: cucumber features/codebreaker_submits_guess.feature but on the bottom of page 78 this changes to: cucumber -r features features/codebreaker_submits_guess.feature even though the output is the same (at least on my system). It also says “Now run There are a few other places where the -r is used (pgs 82, 110, 111, 115) but I haven’t gotten that far yet to know if it’s actually necessary or if the “short” version works as well. | 2009-09-15 | ||
59 | OK | I should say the reason I want to execute my scripts in a particular order is as a convenience for tracking down the source of a problem, not because of code dependencies or bad design. I just want the lowest-level problems to be reported first, so if there’s broken code it’ll be most likely found at the first or second red line. One bad line of production code can cascade through all the specs, causing a bunch of red lines. I like that. I just don’t like having the culprit shuffled in with the victims. If there’s a way to randomize the spec execution sequence, but specify a reporting sequence, that would be ideal. But absent that solution, forcing a preferred execution order would suffice. If anything like this is possible, I’d like to see it covered. | 2009-12-06 | There's nothing in rspec that supports a granular ordering. If you're interested in such, please file a feature request at http://rspec.lighthouseapp.com | |
51 | TYPO | We are instructed to run: | 2009-09-15 | ||
351 | ERROR | The xhr example omits the action:
should be
| 2009-10-04 | ||
340 | SUGGEST | I couldn’t figure out how to do something like when using simple matcher it handled should but didn’t handle should_not | 2009-10-04 | ||
119 | TYPO | It’s role is to collect secret codes and provide statistical infor mation about which colors show up how often in which position. Wrong its. | 2009-08-26 | ||
170 | TYPO | An object’s internal state is an implementation detail, and not part of it’s observable behaviour. Wrong its. | 2009-08-26 | ||
174 | SUGGEST | Section 12.4’s opening paragraph talks about the “common pitfalls of mocking and stubbing.” However the section only mentions mocks. I was trying to figure out if “stubbing” got in there by accident or perhaps all the references to mocks really meant “test doubles.” Either way, I was confused, lol. | 2010-01-17 | ||
40 | ERROR | “See how the Given and When steps in this scenario both use the first The *’ed phrase puts the then in the first person, but the actual scenario definition is: Would the “Thens” be better in the first person, or better to remove the *’ed phrase? Either way, it would align the two snippets and make them consistent. s. love the book, can’t wait for it to be done :) | 2009-09-15 | ||
52 | SUGGEST | Briefly mention that you will be using the Direct Model Access technique to drive the Acceptance tests, mention the other two options, and refer readers the “Behavior Driven Rails” chapter (probably best in a sidebar). Reasoning: When I first read this section to use in a program I was starting, I misunderstood that this was the only way to implement features, so I used Direct Model Access in my desktop app and was confused and turned off because a fair chunk of my code was not being exercised. Often, I am looking for a specific technique to implement immediately, so I’ll jump back and forth a lot and read a book in non-sequential pieces. | 2009-08-26 | I don't think this is appropriate. DMA is specific to Rails and this section of the book has nothing at all to do with Rails. | |
0 | SUGGEST | It would be nice to have a chapter or section for rails plugins and plugins engines like ‘engines’ and ‘desert’, explaining how to maintain tests on such part of rails applications that are not in the core. | 2009-09-15 | Thanks for the suggestion, but unfortunately we can't really cover any nook and cranny in this edition of this book. We'll definitely consider this in a future edition. | |
218 | TYPO | “occurences” must be “occurrences” I suppose. | 2009-08-26 | ||
276 | ERROR | Section: Bootstrapping an app with RSpec and Cucumber On Windows when trying to run: script/generate rspec I receive this error: Malformed version number string mswin32 (ArgumentError) Workaround is to change commented out line to the line below it in file vendor_gem_source_index.rb def version_for_dir(d) there is a discussion in nabble forum about n this. | 2010-01-17 | ||
343 | DEFER | I’m not sure if the Rails Controller chapter is the best place for this (or even if this is the best mechanism to suggest) but I feel that some information on using RSpec for spec’ing routes would be useful to the reader. If nothing else, it’d definitely be useful to me. | 2010-07-21 | ||
310 | TYPO | “… so if you want to ensure “Peanut butter & jelly” is on the page, you’d type just that in the string, not “Peanut butter & jelly”." This is a little confusing since the two strings are the same. Is one of them intended to use & (the HTML entity for &) instead of a plain &? | 2009-09-15 | ||
27 | ERROR | I am using cucumber 0.3.98 with Ubuntu 8.10. When I run the example on p.27, the section where the snippets are expected following “You can implement step definitions for undefined steps with these snippets:” is empty. See: In order to start learning RSpec and Cucumber Scenario: greeter says hello # ./features/greeter_says_hello.feature:7 1 scenario (1 undefined) You can implement step definitions for undefined steps with these snippets: $ | 2009-09-15 | Duplicate with 40736 | |
71 | OK | as_null_object does not ignore the other messages, it uses an array for some odd reason this is my result: 1) Finished in 0.004188 seconds 2 examples, 1 failure | 2009-10-04 | By "ignore" we mean "allow without comment." It still records them for error messages. | |
110 | SUGGEST | Supply download link for: | 2009-12-22 | ||
82 | SUGGEST | The need for the start method parameter breaks the feature “codebreaker_starts_game”. Maybe it should be left as task for the reader to complete the test cycle. | 2009-12-06 | ||
151 | TYPO | one “be” too many “At this stage you could be forgiven for be thinking this looks a lot like traditional top-down decomposition.” | 2009-09-02 | ||
27 | TYPO | Following the instructions leading up to the first cucumber command—“cucumber features”—results in correct output up to and including “You can implement step definitions for undefined steps with these snippets:”, but no snippets are provided. The step_definitions folder and at least an empty greeter_steps.rb need to be present before “cucumber features” will spit out the snippet templates. Simply including instructions to create a placeholder directory and file would help avert confusion and wasted time spent troubleshooting when the output is not as expected. (I’m on Ubuntu 9.04 though I would think the problem is not system specific. Cucumber version is 0.3.98.) | 2009-09-15 | Thanks for letting us know - we'll definitely get it fixed. To avoid future confusion, you should probably stick to the versions listed on http://wiki.github.com/dchelimsky/rspec/code-for-the-rspec-book-beta. This particular example works as advertised with that version, as do (hopefully) most in the book. \n \nDuplicate with 40736 | |
99 | SUGGEST | The code switches from “r g y c” to “r y g c” here. Why not keep consistency through all examples? | 2009-12-23 | ||
126 | ERROR | In generator_spec.rb an instance variable @generator is set in the before method, but not used in any of the following tests. | 2009-09-15 | ||
154 | TYPO | First word on page: “inadvertantly” should be “inadvertently”. | 2009-09-15 | ||
208 | TYPO | 5th paragraph, starting ‘When the Statement executes the generate( ) method,’ contains use of contraction-as-possessive “it’s name() method” … this should be “its name() method” | 2009-09-22 | ||
210 | TYPO | In third paragraph, starting ‘Now we have three participants in the example:’, at the end of the paragraph, the sans-serif text contains the word ‘when’ by accident. It should read ‘Statement logs a message on generate()’ | 2009-09-22 | ||
217 | TYPO | In first paragraph of section “Counts”, at the end, I believe it should read “We can set this expectation explicitly…” rather than “We can make set this expectation explicitly…” | 2009-09-22 | ||
218 | TYPO | misspelling of “message” (as “mesage”) in second paragraph under heading “Negative Expectation” | 2009-09-22 | ||
219 | TYPO | heading “anything()” seems to appear too early. The last paragraph of the previous section appears after that heading, and has the first paragraph of the “anything()” section as its last couple of sentences. | 2009-09-22 | ||
221 | TYPO | Example output appears to be incorrect in section “Custom Argument Matchers”. “BiggerThanThreeMatcher” should be “GreaterThanThreeMatcher” | 2009-09-22 | ||
206 | OK | The method call double() causes an error with RSpec 1.2.8: | 2009-09-22 | double() is introduced in rspec-1.2.9, which hasn't been released yet. This is mentioned in the book. \n \nThere is a release candidate of 1.2.9 available now if you're interested. Just "[sudo] gem install rspec --prerelease". | |
210 | OK | For clarity, shouldn’t the code example contain a mock object instead of a “stub object”? customer = stub(‘customer’) …looks a bit weird. | 2009-09-22 | ||
257 | ERROR | I tried to run ‘autospec’ as suggested on this page, but I found that, while raising no errors, it also did nothing at all. After a little digging, I discovered that I needed to ‘[sudo] gem install ZenTest’ (with caps) in order to have the appropriate foo installed for ‘autospec’ to function. This is under MacOS 10.5.8 (uname -a == Darwin hypercycle.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386) | 2009-09-15 | ||
259 | OK | Perhaps not reasonably w/i the purview of the text, but after installing the ‘heckle’ gem, the example command given in the text results in an error message. According to stackoverflow.com questions 1144906 error-running-heckle-currentcode-undefined-method-translate-for-ruby2ruby | 2009-10-04 | ||
302 | TYPO | at the top, “the line on which the feature is declared” should be “the line on which the scenario is declared” | 2009-09-22 | ||
123 | ERROR | When I try to add the custom failure message: ruby complains about wrong number of arguments:
I have version 1.2.8 of rspec installed. Any idea? | 2009-09-15 | I'd need more detail - that should work as you expect. Please report this to http://rspec.lighthouseapp.com/rspec. \n \nThanks. | |
54 | ERROR | This, I believe, is technically incorrect: “How many times do we invoke Then the game should say: ….? Twice in this scenario!” | 2009-09-15 | ||
56 | SUGGEST | this: | 2009-09-15 | ||
387 | TYPO | “Run the spec—4 examples, 0 failures, 2 pending. Wait a minute. We were expecting it to fail, but it’s passing.” should say: | 2009-10-22 | ||
393 | TYPO | The paragraph beginning with: “Before we get started we need to add a migration for the User model that was added in the controllers chapter. Go ahead and generate a migration to create the users table with a login attribute.” Seems to be leftover from a previous iteration of this chapter. The code examples and the remainder of the chapter does not reference this at all. | 2009-10-22 | ||
72 | SUGGEST | When showing the example of moving the declaration of messenger to the before(:each) method, you have only updated the it “should send a welcome message” action to the new instance variable, though with the intention of removing duplication, we want to update the “should prompt for the first guess” action as well. You may want to reflect this in your example. | 2009-09-15 | It is reflected over the next two pages. One step at a time. | |
27 | TYPO | In first code example, line 4 (Same for all subsequent uses of that line of code.) | 2009-09-15 | ||
30 | TYPO | In last paragraph, “how to use in the context of” should be “how to use them in the context of” | 2009-09-15 | ||
56 | ERROR | Last paragraph on the page says to invoke cucumber as: | 2009-09-15 | ||
27 | ERROR | One thing that I noticed is that the method snippets only appear if you have a step_definitions file. It could be empty, but it must exist to methods snippets to appear. | 2009-09-19 | Duplicate of 40736 | |
324 | TYPO | Missed and & in Peanut butter & jelly? | 2009-09-15 | ||
357 | TYPO | I think the code listing between pages 357 and 358 is incorrect - I was expecting the code for messages_controller.rb rather than a repeat of the code for messages_controller_spec.rb. | 2009-10-04 | ||
60 | OK | Page 60 (implicitly) describes the directory structure as spec/codebreaker, but the chart on page 49 shows codebreaker/spec. So I’m thinking the code on page 60 is wrong…? | 2009-09-19 | The code is right. The top level codebreaker directory in the diagram is the project root, but you can see another codebreaker directory inside the spec directory further down. | |
40 | TYPO | Downloads of code on this page have #START, #END in them ie: #START:title_and_narrative As a code-breaker #START:scenario_only | 2010-07-18 | ||
207 | SUGGEST | The first code example in section 14.2 Method Stubs has misleading code highlighting. On line 6 of the code example: The word “for” is highlighted as a ruby keyword, and led me to some head scratching. | 2010-07-21 | Dave Thomas: Indeed—I'm afraid our syntax highlighter can be dumb on occasions. It isn't a simple fix, so we're going to punt on this one. | |
88 | OK | Code being truncated at right margin on pages 88, 89 and 91 | 2009-12-22 | All truncated code will be addressed before we go to print. | |
351 | ERROR | “The MissingTemplate error is gone, but the spec still fails with a new error: | 2009-10-04 | ||
336 | SUGGEST | I think it would be clearer if you put the code at the very top of this page inside the class definition, that is start the code block with “class ActiveSupport::TestCase” and include the additional “end” statement. It is shown this way on page 334, but here when you tell the reader to add it to the code it’s not shown. | 2009-10-22 | ||
65 | SUGGEST | this is the first time I’m seeing “mock” object introduced. There should be a footnote or short blurb explaining that should_receive sets up an expectation but is satisfied only after game.start is executed. I was so confused by what was going on because I thought that the messenger (STDOUT or StringIO) was receiving a puts message BEFORE game.start. It isn’t until the chapter on Spec::Mocks that the order is explained. | 2009-11-23 | ||
83 | ERROR | My cucumber output does not match the error-free output in the beta book p83: “13 scenarios, 26 undefined steps, 13 passed steps”. I get: When I start a new game # features/step_definitions/codebreaker_steps.rb:12 This is due to the fact that in the features/codebreaker_steps.rb, start() is still called with no arguments, while in the game_spec.rb and game.rb the start() method now requires an argument but this is never addressed in the features/codebreaker_steps.rb file. | 2009-12-06 | ||
128 | TYPO | We could, of course, just think about how we want this to work and just write the code for it, but we want write the simplest thing that could should be “want TO write” | 2009-10-04 | ||
210 | TYPO | Under “Message Expectations,” you use “it’s” instead of “its”: “In this example, if the generate( ) method fails to ask the customer double for it’s name,” | 2009-10-22 | ||
70 | ERROR | This page introduces the “as_null_object”, supposedly as a strategy for allowing the It doesn’t seem to work this way. When I run spec spec/codebreaker/game_spec.rb I get the following logical error message: It seems the as_null_object modifier allows the mock to bypass the unexpected message, but instead it seems to be expecting a specific SET of messages. Hope that made sense. | 2009-11-23 | Added a footnote explaining this. | |
83 | TYPO | midway down the page, | 2009-12-06 | ||
221 | TYPO | The text in the middle of the page says this: “Can’t get much more concise that this.” I believe it should say: “Can’t get much more concise than this.” The word “that” should be changed to “than”. | 2009-10-22 | ||
215 | TYPO | the second describe() and all it() calls do not have a “do” to start the blocks in the WidgetsController example | 2009-10-22 | ||
29 | SUGGEST | Just a small suggestion on the general writing. The phrase “go ahead and X” is used very frequently. You can simplify this and make it a little less repetitive by just writing “X”. | 2009-10-22 | ||
25 | SUGGEST | It might help to include " (DSL)" directly after using it fully spelled out once. And maybe spelling it all out again later on through-out. Almost a touch silly, but i ran across the term DSL later on in the book and didn’t know what it meant, so i searched for it. The line below the full spelling out matched, but when i went to that instance, it was the top line on my screen, so i didn’t see the line above it spelling it out. | 2009-10-22 | ||
28 | SUGGEST | In the “greeter says hello” feature example, the feature description says “As a reader of a The Rspec Book” It seems the intent is to convey that we are ‘a [user] of a [something]’ - however, it reads akwardly. It might read more clearly if it were changed to “As a reader of The Rspec Book” | 2009-10-22 | ||
28 | ERROR | After the user is instructed to type ‘cucumber features’ it says “You should see output like this:” and shows snippets for the pending step definitions. These snippets are only displayed if a file with a .rb extension exists in the features/step_definitions/ directory. I tested this by running ‘cucumber features’ with the following: 1. features/step_definitions does not exist - no snippets were displayed 2. features/step_definitions exists, but contains no files - no snippets were displayed 3. features/step_definitions exists, and contains the file ‘foo.txt’ - no snippets were displayed 4. features/step_definitions exists, and contains the file ‘foo.rb’ - Joy! got snippets 5. features/step_definitions exists, and contains the file ‘greeter_steps.rb’ - got snippets | 2009-10-22 | This has been addressed in a newer version of cucumber | |
334 | ERROR | While setting up Selenium for use with Cucumber, adding the line “config.selenium_wait_timeout = 10” as indicated in the example env.rb causes a NoMethodError to be thrown when ‘rake features’ is run. undefined method `selenium_wait_timeout=’ for # | 2010-01-17 | This was fixed in webrat-0.6.0 | |
51 | TYPO | in the features section, “reponsible” should be “responsible” | 2009-10-22 | ||
300 | TYPO | “In the default configuration, it will also runs each scenario in an isolated DB transaction.” | 2009-10-04 | ||
134 | TYPO | “addiitonal” should be “additional” | 2009-10-04 | ||
108 | ERROR | There is still a logic error in the Codebreaker::Game::guess method, even after the last correction. Similar to the last correction (where a ‘b’ can be overwritten by a ‘w’), the code still suffers from the problem where a ‘w’ can be overwritten by a ‘b’. If the code is ‘r g g c’ and the guess is ‘g g c r’, then the logic works as follows: A code example demonstrating this: module Codebreaker | 2010-01-15 | ||
109 | ERROR | Another code example demonstrating another logic error: module Codebreaker | 2010-01-15 | ||
212 | TYPO | Inconsistency: here “life cycle” is two words, whereas on page 140 it is one. | 2009-10-22 | ||
218 | TYPO | “developement” should be “development” | 2009-10-22 | ||
159 | TYPO | “the acceptance criteria is “owned” by the tester" should be “the acceptance criteria are “owned” by the tester" | 2009-11-23 | ||
158 | ERROR | Contradiction: here on page 158 in the context of describing the BDD process, you state that driving out the detail of a story (including the Acceptance Criteria) “doesn’t need to happen during the inception (and probably shouldn’t!) but it does need to happen before we start coding.” But back on page 40, we were told that Acceptance Test Driven Planning is one of the three practices of BDD, and ATDP specifies that the acceptance tests are agreed on during or possibly before, but no later than, an iteration planning meeting. So does BDD allow for acceptance tests to be defined any time prior to coding, or no later than iteration planning? Furthermore, if BDD is to be more formally defined as consisting of the three specific practices referenced on page 40, then I would expect Chapter 11 to detail this. | 2009-11-25 | That text is talking about inception, not iteration planning. \n \nInception is at the beginning of a project, when we're assembling the full initial stack of stories. That's not the same as iteration planning where we're scheduling work. I'll tweak the text to make this more clear. | |
225 | SUGGEST | Add some introductory/explanatory text to the example code in the “Yielding” subsection | 2010-07-21 | ||
159 | SUGGEST | I’m looking for a good bit more detail on how the BDD and Cucumber/RSpec tie in with the roles and processes of agile development. For example, we are told that testers “own” the acceptance criteria. But how does that flow into the use of tools? It seems quite natural to me to have the testers own the free text part of Cucumber features, and have developers own the step definitions (perhaps after some negotiation with the testers and BAs to get the scenarios phrased in a way that is amenable to step definition automation). Then the coders create the code, specs and step definitions following the “BDD Cycle” described earlier. As the coders finish some subset of story functionality, they check in their work in progress into source control, and the cucumber reports resulting from the continuous integration build inform the testers of what scenarios in the story are ready for him to start manual/exploratory testing. Then this should flow in to product owner acceptance of the story when all acceptance criteria are demonstrated. You’ve started the description of how we kick off use of BDD. Tie it in more tightly with all of the processes within an agile iteration. Also, some discussion is warranted here regarding the applicability of BDD and Cucumber/RSpec to acceptance criteria in general. What types of acceptance criteria should be driven out by BDD? Everything, always, or are there times when other methods like prototyping of screens (without true end-to-end slices of functionality) should be used instead? Similarly, what types of acceptance criteria are appropriate to drive out using Cucumber and RSpec, vs. others which are more appropriate for other tools or manual processes? When different methods are more appropriate, what roles should own them? Should there be a process step early in each story where the acceptance criteria are discussed, and the testers and coders decide how each one should be demonstrated, with some handled by coders using Cucumber/RSpec, and others demonstrated by testers using other processes/tools like manual testing or GUI automation tools like Selenium? Should there not be a division of responsibilities across roles so that the resulting automation test suite is complete and non-overlapping (DRY)? If so, what do you suggest for a proper division? | 2010-01-15 | Thanks for your thoughtful comments, Tim. I agree there should be more information generally about BDD as a methodology, but that is beyond the scope of the RSpec book. A full treatment of BDD would be a book in its own right, and would necessarily be tool-agnostic (although it might have opinions :) \n \nWhen you talk about roles and processes of "agile development" I'm guessing you are referring to Scrum because you mention roles like Customer and Product Owner. Also you mention "processes within an agile iteration". Some agile methods don't even have iterations (Lean and Kanban for instance) and some use a different term like Sprint (Scrum again) or Timebox (DSDM). \n \nDitto your comments about acceptance criteria. That is another topic worth a fuller discussion in a BDD methodology book (think "XP Explained", or "Domain-Driven Design"), and I would like to expand on the relationship with models like Systems Thinking and Lean. \n \nAs regards your last question, I don't think DRY applies so much to acceptance testing. A test suite is made up of complementary tests, so there is no reason not to test the same behaviour for different reasons (correctness, speed/latency, repeatability/idempotence, concurrency, etc.). The primary value of tests is readability, both in terms of the test narrative and the error when something fails. I blogged about this a while ago at http://dannorth.net/2008/06/let-your-examples-flow. | |
115 | SUGGEST | The Cucumber “World” concept has not been introduced to the reader yet at this point. Perhaps add a forward reference to the Cucumber chapter, or rephrase. | 2010-01-17 | ||
113 | ERROR | I don’t agree with this assertion in the text: | 2010-01-17 | ||
77 | SUGGEST | “Luckily, we have tools in both RSpec and Cucumber to keep things simultaneously readable and DRY.” On the contrary, I find that the combination of both RSpec and Cucumber causes a decidedly non-DRY result. When the BDD Cycle process is followed, a redundant RSpec code example is created for every failing Cucumber scenario. The result is a lot of overlapping tests. In the final iteration of the Codebreaker, the resulting RSpec and Cucumber suites were about 80% redundant with one another. While I recognize that the primary purpose of Cucumber scenarios and RSpec code examples is to drive out the design, an important secondary use for them is as a regression test suite. As a result of the overlap of the RSpec and Cucumber suites, the majority of features in the Codebreaker app had two tests which would fail if any of the functionality changed. Over time this would result in a significant drag on development extensions of the app. Shouldn’t we be trying to have a DRY test suite with minimal redundancy? Specifically, I question the wisdom of creating a failing RSpec example for every failing Cucumber step definition. What is the harm in allowing the step definition to drive the application design directly? Perhaps overlap of test suites is not such a big issue in a more serious application. In a toy app like Codebreaker, there is little behavior which is not directly externally visible to users. This may ultimately be the cause of why the two test suites overlap so drastically. Bigger apps with more hidden details would have more RSpec examples not duplicated as Cucumber scenarios, so the proportion of overlapping tests would be smaller. Still, why should there need to be redundant test coverage even for externally facing behaviors? It seems like some guidance is in order regarding which tool is more appropriate for which kinds of behaviors. E.g., Cucumber should be used for externally visible behaviors which are important enough to be included in acceptance criteria for features, whereas RSpec should be used for lower-level behaviors. Or similarly Cucumber is a tool for black-box behavioral testing where RSpec is for white box. If the authors truly believe that there is real value in creating the redundant RSpec tests in order to better drive out the design (and I’m not catching how the redundant RSpec example is any better than the step definition it matches), perhaps then the process should include a step to delete the redundant RSpec tests from the test suite following story acceptance (or feature release). If their value has played out, why pay the cost of dragging along the baggage of redundant tests? Furthermore, I think there should be a clearer distinction between what behaviors should be demonstrated in Cucumber vs. RSpec acknowledging the target audience for the tools. RSpec is a developer-centric tool, where Cucumber bridges the gap to testers and BAs. I think a strong argument can be made that all non-trivial externally visible behaviors should be reflected in Cucumber scenarios. In the BDD cycle when creating RSpec tests, if the developer discovers a new behavior needed by the app, your description has him creating an RSpec code example for it. But should that behavior then be demonstrated by a Cucumber scenario which duplicates (or preferably replaces) the RSpec example? The advantage of moving the behavioral demonstration to Cucumber is that you have made it accessible to testers and BAs, which assures that they become aware of it and gives them a change to review it. Developers alone should not be the ones to decide important functionality of the app. In the Codebreaker app, an example of this is adding the ‘reveal’ feature to Game::guess(). While this was done to facilitate testing, it resulted in the addition of important externally accessible behavior, and the BAs should be aware of it. E.g., the BAs might object to adding a mechanism to the game which makes it so easy to cheat, because they might be targeting the app toward competition use. Leaving the demonstration of the behavior “buried” down in RSpec is unwise from an agile process perspective. Throughout the book, I would expect to see more information regarding best practices for use of the tools and how they should fit into agile processes, not just a demonstration of how the tools work. Some of what I am asking for belongs more in Chapter 11, but I would also expect to see more about how to make appropriate use of the tools throughout the extended Codebreaker example in Part 1. | 2009-12-06 | Hey Tim - you've presented a lot to think and talk about here, and I'd love to discuss it with you, but the errata page is really not the right forum. If you're interested in a conversation, please re-post to the discussion forum at: http://forums.pragprog.com/forums/95. \n \nYou also might want to consider posting this on the rspec users (http://rubyforge.org/mailman/listinfo/rspec-users) or cucumber (http://groups.google.com/group/cukes) lists/groups where more people who have experience with BDD can chime in. I really hope you will post in either location, but I can't really mark this "fixed" or "not fixed." \n \nCheers, \nDavid | |
334 | SUGGEST | It says “To modify this feature file to run through Selenium, we must make.” It should say “we had to make”. | 2009-10-22 | ||
42 | OK | Just to make things 100% idiot-proof, maybe you should state that the file we have just written goes into the features subdirectory. | 2009-12-06 | It is already present in the path, which is in both the links to the example code files and in the text. | |
369 | TYPO | The last paragraph references creating the messages_controller.rb file and adding in the MessagesController class, but the following code is from the messages_controller_spec.rb displayed earlier in the page. | 2009-10-22 | ||
39 | TYPO | Does that sound like we’re putting the developer’s needs ahead of the | 2009-10-22 | ||
75 | SUGGEST | Has it been explicitly explained how to “run the script” before this point? | 2009-11-23 | ||
204 | TYPO | “Can’t get much more concise that this.” should read: " Can’t get much more concise than this." | 2009-10-22 | ||
100 | ERROR | Between chapters, the code used in the scenarios seems to have swapped from “r g y c” to “r y g c,” causing the output to differ from that presented in the book. | 2009-12-23 | ||
32 | TYPO | We picked a game because we thought it be more I think you meant - | 2009-11-23 | ||
52 | OK | The given block that starts on page 51 is interrupted by footnotes on that page, followed by a gray box explaining the download files, and then there’s the word “end” - code block should not be broken up if at all possible for clarity purposes | 2009-11-23 | Formatting issues like this will be managed when we go to copy edit, which doesn't happen until the end of the beta program. | |
55 | OK | I’m getting errors after copying code from the pdf into gedit and then running cucumber - code that has a " followed by a $ is inserting a space when copied into the editor - this results in a step undefined error - this happens with all such code that I have copied, such as the following - (as a matter of fact, the space was added when pasting into this “description” box, so it must be there but not showing in the .pdf Then /^I should see “([^\\”]*)" $/ do |message| | 2009-12-06 | Not sure what reader you're using, but what you're describing is a function of the reader and there's little we can do about that. | |
62 | OK | Similar issue here as reported before - there’s a big “Joe Asks” box followed by the word “end”, which is the final bit of code from the previous page interrupted by footnotes and “Joe Asks” | 2009-11-23 | David Chelimsky says: Formatting issues like this will be managed when we go to copy edit, which doesn't happen until the end of the beta program. | |
61 | OK | Working the code along with the text was very intuitive up to this page - all of a sudden, it’s just “add code to this file a command”, add another command to another file, include this, include that - and voila everything will work. I take it you’re assuming everyone knows what $LOAD_PATH and File.join and File.dirname commands are doing. Obviously, one can figure it out but the intent of the book should be more tutorial and explanation, as previous pages were. | 2009-12-21 | The book assumes a basic working knowledge of Ruby, which includes understanding the things you're asking that we explain. We do try to explain some things as we go along, but we can't stop to explain everything and still keep advanced readers interested, so we've attempted to strike the right balance. | |
62 | OK | I’m getting lost at this point - on page 60 the chapter starts with “we’re going to use RSpec to describe behavior” then it’s three pages of adding code to various files, ending with running an RSpec command that really tells us nothing - then moving on to cucumber again? The book had a great pace and I knew exactly what was going on until Chapter 5. | 2009-12-06 | Not sure how to help you with that. The infrastructure we add there is necessary before we can proceed. | |
71 | OK | Had to use , :null_object => true in declaring the mock as as_null_object blew up | 2009-11-23 | Are you using rspec-1.2.9? If you are and you're still seeing this, please report a bug to the rspec tracker at http://rspec.lighthouseapp.com. | |
74 | SUGGEST | Looking at the code, especially when doing refactors - the refactored lines should be highlighted in some way to immediately make obvious what is being changed | 2010-01-15 | ||
75 | SUGGEST | I really think this chapter needs some work - we end on page 72 with an spec command. Then we do a bunch of fairly clear refactorings, only to be told to “run the feature again” - well, the last thing we did was spec - now we’re back to features. This chapter really bounces back and forth and loses the reader along the way | 2010-01-15 | ||
83 | TYPO | def start should be otherwise test breaks again | 2009-12-06 | ||
344 | TYPO | There are two “The”s in the second section of "render(), response(), and contain(). | 2009-11-23 | ||
347 | TYPO | “Update the before block to use mock_model( )” The before block was in beta 10.0 its no longer in beta 11.0 | 2010-01-17 | ||
348 | SUGGEST | text from 348 to 351 needs breaking up with some headers. Its very easy to get lost in the example. I would suggest some sub headings like Create Message Class Perhaps these could be notes in the margin if titles are to unobtrusive | 2010-07-21 | ||
354 | OK | orphaned ‘end’ from code example at beginning of page - should be kept with rest of code example | 2009-11-24 | Formatting issues like this will be managed when we go to copy edit, which doesn't happen until the end of the beta program. | |
360 | TYPO | “Open the new template and remove the form. ” | 2009-12-22 | ||
303 | TYPO | In the rspec_model generation snippet, the ‘rake db:migrate’ task is misspelled as ‘rake db:mgirate’ | 2009-11-23 | ||
370 | OK | p369/370 | 2009-12-22 | The stub in the before block gets overridden by the expectation in the example, so we actually do need to return it in this case, otherwise the example raises an error on nil.save. | |
405 | SUGGEST | This should be part of the Subscription spec: it “ignores messages from previous months” do Also I can’t see why you’re passing the date into can_send_message. There is no obvious current need to do this. Shouldn’t we just spec it as it is used in user? i.e. subscription.can_send_message? self | 2010-01-15 | ||
391 | SUGGEST | This change of messages_controller break loads of the tests. It’s not at all obvious how to refactor the tests and controller in tandem to achieve this. Especially as I can’t see how to reference the current_user. This needs to be explained. | 2010-07-23 | ||
301 | TYPO | “Go ahead and run script/cucumber —tag focus from the project root” should be “Go ahead and run script/cucumber —tag @focus from the project root”, to work with cucumber 0.4.3 | 2009-11-23 | ||
303 | TYPO | “Now run cucumber -t focus so we can see how we’re doing” should be “Now run cucumber -t @focus so we can see how we’re doing”, when using cucumber 0.4.3. Also, is it intentional to use ‘cucumber’, rather than ‘script/cucumber’? If so, you probably want to call out the difference and explain that it’s a shortcut and/or how it differs from ‘script/cucumber’. | 2009-12-06 | ||
83 | SUGGEST | Under “A Small Change Goes a Long Way” I just don’t think it’s explained very well when you say “Run the feature again with cucumber” that you mean “cucumber features/codebreaker_submits_guess.feature” and not just “cucumber” which is why the former poster thought they had to send a code in codebreaker_steps.rb. I got confused, too, when I didn’t get the 13/26/13 thing. Then I realized what you meant by “Run the feature again with cucumber”… I would clarify this. | 2009-12-06 | ||
51 | OK | In section 4.2 Steps and Step Definitions, the code example is split, with the “end” being orphaned on page 52 and separated from the widow by a callout “Doanloadable Files.” That is, on page 51 there is some code that should read: Given /I am not yet playing/ do But this code is split by (a) the page break, (b) footers, © the “Downloadable Files” call-out. So on page 51 you see: then on page 52 you see: end which is a little odd. | 2009-11-23 | Formatting issues like this will be managed when we go to copy edit, which doesn't happen until the end of the beta program. | |
303 | TYPO | after doing “script/generate rspec_model” | 2009-11-23 | ||
301 | TYPO | I got following error when I run “script/cucumber —tag focus” Tag names must start with an @ sign. The following tag name didn’t: focus (RuntimeError) The error disappear when run follwing, | 2009-11-23 | ||
34 | SUGGEST | I think you should spell out the fact that the computer is taking the Code Maker role. | 2009-11-23 | ||
45 | ERROR | “This looks a lot like the scenario declarations we wrote for the code- breaker starts game feature, with two subtle differences” - should refer to the code-breaker submits guess feature. | 2009-11-23 | ||
344 | TYPO | require ‘webrat/integrations/rspec-rails’ should be: require ‘webrat/integration/rspec-rails’ | 2009-12-06 | ||
344 | TYPO | “… outermost describe( ) block, “mes- It’s missing a space before “in this case.” Maybe “messages/show.html.erb” should not break in two lines as it is a filename. | 2009-11-23 | ||
394 | OK | on rails_models/beta2/03/app/models/user.rb snippet “… Should be and not | 2009-12-22 | :class_name should reference a String, not a class. It should either be as/is (Message.name), or represented as a String ("Message") | |
344 | TYPO | The second sentence in the first paragraph under render(), response() and contain() says: “The The rendered content[…]” Hope that’s clear enough ;) | 2009-11-23 | ||
301 | TYPO | First full paragraph on the page starts with “The do,”. It should be “They do,”. | 2009-11-23 | ||
33 | DEFER | I would like more information on the higher-level project descriptions i.e. outcomes and feature sets, and how they fit in. Specifically, I want to know how they would fit in with the codebreaker example - what are the feature sets for it? Would there be outcomes? | 2010-07-18 | ||
303 | TYPO | Last sentence of last paragraph, file name should be movie.rb not movies.rb. | 2009-11-23 | ||
356 | TYPO | In the _form code at the bottom of the page, the line beginning with “describe” should have a triangle marker next to it denoting the line has changed. | 2010-01-17 | ||
357 | TYPO | The two code lines beginning with “@message.stub” should have triangle markers denoting these lines have changed. | 2010-01-17 | ||
356 | ERROR | In the code for _form.html.erb_spec.rb both the book and the download are missing the empty Message class definition (class Message; end). I get: when I don’t include the empty class definition in the code. | 2010-01-17 | ||
338 | ERROR | A cross reference is missing in the third bullet point: You’re not using the Webrat API. If you’re using the technique | 2010-01-17 | ||
348 | TYPO | “undefined method `message_path’” should be undefined method `messages_path’ with an extra s. Same for: “there is no message_path route” | 2009-12-06 | ||
119 | ERROR | In the inner line of the Then implementation, you can’t line-break before the . because Ruby will think it’s an end-of-statement. secret_codes.count_for(color, position) should be secret_codes.count_for(color, position). Tested on MRI 1.8.7p174 | 2009-11-23 | ||
368 | SUGGEST | If you created the app with “rails views_example” and have been following along, adding code as you read, you get an “uninitialized constant Message” error rather than the “No action responded to create”. As far as I can tell the book never says when to create the message.rb model file. I think the book would be improved if you mentioned at some point when to create message.rb. Seems like you expected this to happen sometime in the last chapter (see my comment #41571:). | 2010-01-17 | ||
378 | TYPO | 3rd line up from the bottom of the page should say: At least that is the error I got. | 2010-07-21 | ||
381 | TYPO | Last word, first paragraph missing an ‘a’ from behaviour. | 2009-12-06 | ||
301 | TYPO | The line: should be “They do…” | 2009-12-06 | ||
389 | ERROR | This page says: “Now all examples are passing…” but I’m still getting an error: “uninitialized constant Message::User (NameError)” Looking at the schema.rb from the downloadable code it looks like a User model got generated but I don’t see this mentioned in the book. To get things working I did the following: | 2010-07-21 | ||
36 | OK | In the footnote, is the word “smaller” supposed to be “larger” or “bigger”? | 2009-12-06 | No. That's the joke. Rather than getting a bigger card to fit more information on, you should get an even smaller card to enforce the constraint of having very little detail on the card. | |
40 | TYPO | you use “the the” right before the start of the narrative paragraph: … which improves our ability to plan iterations, hence the the name Acceptance Test Driven Planning. | 2009-12-06 | ||
41 | SUGGEST | I noticed that on page 28, you use the “In order to… As a… I want” style, but on this page you are still using the older “As a… I want… So that…” Is this intentional, or did pg. 41 not get updated. You may have mentioned it, but it might be helpful to mention the theory behind keeping the “In order to” first (Liz Keogh has some great stuff on this). | 2010-01-17 | ||
61 | OK | “We’ll want to load game.rb and any other source files from a single location, so require the file from lib/codebreaker.rb” Huh, lol?! Why would we want to do that? Thanks - love the book!! | 2009-12-06 | This is a standard convention in many libraries. It helps with namespacing (it would not be good to have a top level Game class), organization, and code navigation. | |
314 | ERROR | env.rb file for simulated_browser/03 supplied with the code is incorrect. It referrs to selenium and throws errors when run as suggested in the book in the footnote 2. However, if you are following along (I am), the env.rb file that gets generated is fine and the code executes correctly. So, in a nutshell, the code supplied with the book is out of sync with the book. Bharat | 2010-01-17 | ||
317 | TYPO | In the last sentence of the first paragraph, I believe it should say unobtrusive instead of obtrusive. | 2009-12-06 | ||
344 | TYPO | Last paragraph starts with The The. | 2009-12-06 | ||
398 | SUGGEST | On the last paragraph of this page you ask for a migration, but don’t mention doing “db:test:prepare” as you have done in other places in the book. Might be nice to make mention of that here too. | 2010-01-15 | ||
83 | TYPO | My cucumber returns: | 2009-12-06 | ||
353 | TYPO | new.html.erb_spec.rb file code has dropped the line: | 2010-01-17 | ||
115 | SUGGEST | I don’t understand the footnote on this page: “Note that the code included when you require spec/stubs/cucumber does not verify message expectations.” I’m guessing it means that you still have to require rspec in addition to “require ‘spec/stubs/cucumber’,” but I’d love some more info here. Thanks! | 2009-12-22 | ||
84 | ERROR | The example code for cb/27/lib/codebreaker/game.rb should contain the argument “code” for the def start method (fixed below): def start(code) | 2009-12-06 | ||
304 | SUGGEST | I believe that it would be a lot better if the rails example was as integrated as the codebreaker. In truth it defines a very different aproach from regular rails and it doesn’t make sense to use old rails approach to continue the example because the rspec way is only in latter chapters. Its a great book and it would be great if you could make it more complete, as some issues are very fresh and aren’t easy to track down over the web. | 2009-12-06 | Appreciate the thought and it's something we may do in a 2nd addition. | |
420 | TYPO | Eliminate the the second instance of the word “be” from the sentence: “In order to control how many messages can be sent in a month, the subscription will need to be know how many messages have already been sent.” On the very first line of this page. | 2009-12-06 | ||
135 | TYPO | feel for how to do go about it | 2009-12-06 | ||
145 | OK | Using the code linked to from pp 144-145, rspec is generating errors for the two summary tests: Spec::Mocks::MockExpectationError in ‘Codebreaker::Game marking a guess with the text ’summary’ after one guess should print the summary’ and Spec::Mocks::MockExpectationError in ‘Codebreaker::Game marking a guess with the text ’summary’ after three guesses should print the summary’ Changing code back to pass strings and matching the strings works. rspec 1.2.9 | 2009-12-06 | That code is part of the source download. If you grab the entire code/cb/73 directory and run 'spec spec' all specs pass. Any chance there is an error somewhere else (like in the specs themselves)? | |
27 | SUGGEST | The “gem install cucumber” should be on a seperate line in the blue “code” font. this would match the “gem install rspec” instruction on page 26 and make it easier to find. | 2009-12-06 | ||
88 | OK | spec spec/codebreaker/game_spec.rb —format nested | 2009-12-21 | If that's true it's a bug related to ruby on windows. The failure message you see in the book is generated by running the code. Can you please verify that it's a bug and report it to http://rspec.lighthouseinfo.com? \n \nThx | |
410 | ERROR | current_user is not defined in the messages_controller context, thus the spec throwing an error. | 2010-07-25 | ||
41 | TYPO | Just above title “Narrative”: | 2009-12-06 | ||
354 | ERROR | Under Snow Leopard, Cucumber + Selenium + Firefox is teh fux0red. Either need to patch Selenium or use Safari. Also, current Selenium changed transaction behavior, so scenarios need @no-txn to work. | 2010-01-17 | Solution is at http://agilesoftwaretesting.com/?p=105 | |
144 | ERROR | Pages 144-145, related to #41707. I was receiving the same Spec errors pertaining to :send_summary. The code in code/cb/73 had one additional fix that isn’t covered in the text of the chapter, which is the addition of the def ==(other) method in guess.rb The game_spec.rb file will not pass until the def ==(other) method is added to guess.rb, but there’s no explanation as to what the method does or why it is needed. | 2009-12-22 | ||
165 | SUGGEST | The paragraph “Outcome-based planning” ends with “and that that’s ok” which might be correct but the two “that” sound very strange and could it be dropped anyways. | 2010-07-18 | The book hasn't been through copyedit yet. Wording issues like this will be addressed when we get there. \n | |
219 | OK | I find your diagrams such as in Figure 13.2 to be a bit confusing and generally not helpful in understanding the flow of how the example works. Maybe it’s just me, but it could be something to improve upon. | 2009-12-23 | It is a complex interaction, but that diagram is a standard UML interaction diagram. It'll make sense to readers who have experience with UML. | |
145 | TYPO | Very begining of section 9.3, Cucumber in the Outfield: I can read some “some” duplication in this sentence (not mine, the one of the book ;-) | 2009-12-22 | ||
152 | TYPO | psuedo-code -> pseudo-code in “With that in mind, your next refactoring exercise, and this is admittedly a doozy, is to convert the current mark algorithm to one that expresses this psuedo-code.” | 2009-12-22 | ||
52 | TYPO | Shouldn’t Given /I am not yet playing/ do be Given /^I am not yet playing$/ do ? | 2009-12-21 | ||
0 | OK | Could you include a short section on testing rake tasks? I think that could be pretty helpful. | 2009-12-21 | Sorry, but scope is closed for this book - we're getting close to print now. | |
130 | OK | codes.uniq.length.should be >= 95 … It fails with expected >= 95, got 1. … I think it should be: “It fails with expected <= 95, got 1.” | 2009-12-22 | >= is correct | |
354 | TYPO | Typo around middle of the page at “Now that we’ve seen how we to configure Webrat, Cucumber, and Rails | 2009-12-22 | ||
356 | TYPO | [CROSS REF] should reference sections 21.2 and 21.3 | 2010-01-17 | ||
358 | OK | There is a code line ending with TRUNC, is this supposed to be truncated? Line starts with “selenium.is_ordered …” | 2009-12-22 | Yes - all of the truncated code will be addressed before we go to print. | |
98 | SUGGEST | From your page: Google “exploratory testing” and you’ll find upwards of 785,000 Your point about testing is well-taken, but using Google counts is getting to be notoriously tricky. I think the huge counts are overly suggestive and maybe can’t even by counted on. When I did it today (2009-12-11), I got about 653,000 results. Actually going through them — I clicked on page 10 and got page 8 — ends with “In order to show you the most relevant results, we have omitted some entries very similar to the 734 already displayed. When I searched with the term in quotes, I got about 61,500 results. Again, I clicked on page 10 and got page 8 with “In order to show you the most relevant results, we have omitted some entries very similar to the 715 already displayed. I frankly don’t know how to evaluate the huge count. I think the but bottoming out at less than 800 also certainly suggests something. But I can’t say I’m even clear about that. | 2009-12-21 | Fair enough. Changed it to "hundreds of thousands" | |
227 | SUGGEST | This section indicates that a clarification will be made about the differences of using stub, mock and double to make a spec more clear, but I don’t think it is really addressed in the chapter. After finishing the chapter, I am still unsure of when to really use mock vs. double. The chapter alludes that mock presents a tighter connection to the subject of the spec than stub, but the double instance doesn’t seem to be addressed. | 2010-07-21 | ||
368 | TYPO | Should there be a green arrow next to the code line “<%= f.text_field :title %>” do denote that this is the new line to add in the file? (location at approx middle of page) | 2009-12-22 | ||
372 | TYPO | Last line before section 23.3 starts, “specs, the can be very helpful throughout the spec suite.”, the word “the” should be “they”. | 2010-01-17 | ||
382 | TYPO | left out the word “see” in the sentence: “If you run | 2009-12-22 | ||
367 | OK | Is there any benefit to creating the Message class in the spec helper? Why not actually go ahead and create the model at this point? Is it just for simplicity? | 2009-12-22 | It's just a technique to keep you moving. We're trying to stay focused on the task at hand, which is not creating a Message class. | |
29 | SUGGEST | The cucumber output in my terminal is colored and seems to be one of the major features of cucumber (run it till it’s green!). Have you thought about applying the same colors to the output in the book instead of everything being blue? | 2009-12-21 | We hadn't because none of that will show up in print (which is black and white). | |
402 | SUGGEST | PORO = Plain old ruby object, yes? Is this abbreviation defined elsewhere, I had to google it. | 2009-12-21 | p362 in the section on views. | |
229 | TYPO | Practicioner should be practitioner | 2009-12-22 | ||
21 | OK | When viewing the PDF using Adobe 9.2.0 on Windows XP the equals signs within the code sample appear instead as what look to be bolded dashes. When I copy and paste the code sample into emacs the code appears correctly with the equals sign: describe MovieList do Therefore this issue only appears when viewing sample code within the Adobe PDF viewer but copy and paste into another program renders the sample code correctly. This issue is not unique to page #21 of the PDF but it is the first instance I noted it. I can provide a screenshot of the error if desired. Asa | 2010-07-18 | Sounds like an issue with your PDF viewer. Not much we can do about that here. | |
59 | OK | “… run cucumber -s again and you should see I think you meant to write “cucumber features/codebreaker_starts_game.feature -s” instead of “cucumber -s” to get output quoted within book. | 2009-12-22 | That output is actually generated by running that command (cucumber -s) without the filename. | |
61 | OK | spec/codebreaker/ should be codebreaker/spec/ | 2009-12-22 | It's correct as/is. The file is spec/codebreaker/game_spec.rb. | |
65 | OK | Might want to include spec command along the lines of: | 2009-12-22 | By now the reader has typed "spec spec" (or similar) several times. | |
85 | TYPO | game = Game.new - this line fails with wrong number of arguments (0 for 1) should it instead be game = Game.new(@messenger) ? | 2009-12-21 | ||
324 | TYPO | In “Scenario: Hide minutes for times ending with 00”, the When is: ‘When I set the showtime to “2007-10-10” at “2:15pm”’. Shouldn’t it be: ‘When I set the showtime to “2007-10-10” at “2:00pm”’? | 2009-12-22 | ||
82 | SUGGEST | This part of the chapter becomes VERY fuzzy. It’s the first time my code breaks and does not behave like the book as I go along. Maybe you should clarify a bit. If this… “The one that is failing is the only example left that is still calling start() with no code, and it’s a near duplicate of the passing example that says (passing the code to start). We can now safely remove the failing example, and remove the parenthetical context from the passing example, leaving us with this:” … is true, why are we instructed to to this… “def start ??? - Should’nt it be instead… “def start(code) … If one wants to insure that the code is required by the start method? | 2009-12-21 | ||
120 | TYPO | secret_codes.count_for(color, position). <- remove period should be_between(min.to_i,max.to_i) <- add space after comma for consistency | 2009-12-22 | We need the period because should() is being called on the result of that line. \n \nAdded the space. | |
310 | TYPO | Need to update: to: Starting with Cucumber 0.4.5 you will need the cucumber-rails gem | 2010-01-17 | ||
320 | TYPO | script/cucumber -tag @focus fails with: Missing these required gems: I ran rake gems:install to no avail but gem install database_cleaner worked. | 2010-07-21 | ||
322 | TYPO | cucumber -t focus should instead be cucumber -t @focus | 2009-12-23 | ||
337 | TYPO | webrat_steps.rb should be renamed web_steps.rb | 2010-01-17 | ||
378 | TYPO | Download rails_views/messages/15/spec/views/messages/edit.html.erb_spec.rb -> need to add class Message; end within download file | 2010-01-17 | ||
384 | TYPO | of of other components remove redundant of | 2010-01-17 | ||
141 | SUGGEST | In “Designing Interfaces with Mock Objects”, we go through a section of refactoring, in particular the Game spec. There’s a part where we happen to end up comparing equality between objects: @messenger.should_receive(:send_summary).with([Guess.new(%w[b w y r], %w[w w])]) The last two tests in the Game spec will fail even when it looks like everything should be fine, because there’s no equality defined in the Guess class yet. I looked through the code examples relating to that section (rev 73) and found this in the Guess class: def (other)
other.guess self.guess && other.mark == self.mark There doesn’t seem to be any mention of this method before page 153, and if it’s left to be an exercise to the reader, it wasn’t an obvious one. I spent quite a long time trying to figure out what was going wrong. It was frustrating because I’d been following the examples and instructions and felt compelled reread that section several times before giving up and digging into the example code. Some clarity would be nice here :) | 2010-01-15 | ||
395 | DEFER | It’d be great if you could add a note as to how to handle errors that are raised in Webrat/Cucumber. On 395, the example of implementing an “access denied” feature in your ApplicationController is a good one, but it left me lost when I did the next logical step, which was to try and build it out using Cucumber. Here’s what I tried, in the wild, with the application controller/spec implemented as suggested: Scenario: Users cannot sign up when sign ups are disabled The second step (using the built-in when I go to…) causes an AccessDenied error to be thrown (as you’d expect). However, when Webrat encounters the exception, it reraises it and the test fails. I’m not sure how to handle this (maybe with lambda { visit … } ?), but some clarification would be fantastic here, seeing as it’s the next logical step someone might try. | 2010-07-21 | ||
395 | SUGGEST | Addendum to #41956: The solution was found in features/support/env.rb which specifies the @allow-rescue tag. | 2010-07-21 | ||
313 | ERROR | Installing the Cucumber gem installs 0.5.3. When I ran the ‘script/generate cucumber’ I got “Couldn’t find ‘cucumber’ generator”. When I dug around, I found that after Cucumber 0.4.5 you need to install the Cucumber-Rails gem. Either the old gem needs to be specified, or the instructions to install Cucumber-Rails gem needs to be added. | 2010-01-17 | ||
37 | TYPO | Should the phrase “breaking the guess” be “breaking the code”? | 2010-01-15 | ||
56 | TYPO | The sentence “it is very, very liberating, and results consistently in more usable APIs” should be written as “it is very, very liberating and results consistently in more usable APIs” or “it is very, very liberating, and it results consistently in more usable APIs”. | 2010-01-15 | ||
310 | ERROR | Now needs the gem ‘cucumber-rails’, in order to get script/generate cucumber to work. You’ll also need to specify “—webrat” and “—rspec”, given the other gems listed. | 2010-01-17 | ||
310 | TYPO | script/generate cucumber - add the “—spork” unless on Windows? | 2010-07-21 | ||
409 | TYPO | Near the bottom of “Should I spec associations?” box. Pretty sure there is some kind of typo here: “They’re just part of wiring up the association, and an that requires them won’t work correctly without them, so there is no need to spec them directly either.” | 2010-01-15 | ||
352 | ERROR | Simply commenting out “Cucumber::Rails.use_transactional_fixtures” caused the scenarios to fail. Setting it to false will make the scenarios pass again. (I’m using all the latest gems) | 2010-01-17 | ||
377 | OK | For an existing record, shouldn’t the method be “put”? | 2010-01-17 | There is a hidden field named _method that is set to "put", but the method attribute of the form tag is still "post" | |
320 | ERROR | Running script/cucumber —tag @focus (on Win32) results in: WARNING: C:/data/donp/NetBeansProjects/showtime/features/support/env.rb:18: cucumber/webrat/element_locator.rb is deprecated and will be removed in Cucumber 0.6.0. Solution is to comment out line 18 in features/support/env.rb: | 2010-07-21 | ||
41 | TYPO | There is a double “the” (“the the”) in the final of the third paragraph. “hence the the name Acceptance Test Driven Planning.” Regards. | 2010-01-17 | ||
279 | TYPO | the link to textmate bundle has a typo | 2010-01-18 | ||
322 | SUGGEST | FYI, on MS Windows XP with ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32], Time.now.strftime(“%l”) => “”. I notice that the %l isn’t documented in the Pickaxe. I used: | 2010-07-21 | ||
303 | TYPO | Second para after “Bundling in vendor/gems” - “With that configration in place” should be “With that config*u*ration in place” | 2010-01-19 | ||
305 | TYPO | Second sentence - “…use together to begin driving development from the outside.” Thinking that should be “from the outside-in” since you say that everywhere else, including the preceding sentence. ;) Maybe: “So far we’ve explored the concepts of BDD in Rails at a high level, and set up a project with the recommended tools. In the next chapter we’ll take a look at how Cucumber and Rails and be used together to really begin the outside-in development of our application. Turn the page and let’s begin.” Or something like that. ;) | 2010-07-21 | Something like that, indeed. | |
302 | TYPO | When explaining the output of script/generate cucumber there is no description for config/cucumber.yml. | 2010-07-21 | ||
303 | SUGGEST | For the “Bundling in vendor/gems” and “Bundling in vendor/plugins” - what I forsee happening is someone relatively new to Rails reading the book and following it blindly, but being confused when they get here. Some more context as to /why/ one would pick one, the other, or neither might be helpful. Maybe a little callout section or something just before those two sections. | 2010-07-21 | ||
34 | TYPO | Dropped the end of the 4th paragraph - “A - indicates a number match: one of the numbers in the guess is the same as one of the numbers in the secret code, but in a” | 2010-02-03 | ||
303 | SUGGEST | Regarding the “Bundling in vendor/gems” section starting on p.303; Unpacking dependencies installs Nokogiri which will cause an error when running the first scenario on p.309. Shouldn’t the book instruct the reader to remove Nokogiri from vendor/gems as it contains native extensions? I think this was mentioned in passing on b12 but has not been included on b13. | 2010-07-21 | ||
36 | SUGGEST | In the “Focus on the Role” section, the “Coh04” link Is being displayed in bright green. This is incredibly hard to read on the gray background. I’m viewing the PDF using Preview.app on a 13" Macbook Pro running Snow Leopard (10.6.2). I don’t think I have done any customization that would cause the color to be different on my system, but don’t remember for sure. The same bright green link also appears in the body text on Page 35 (“JAH02”) and, while it’s easier to read on a white background, it is still somewhat painful. I do see that this is the same in other PragPub books (e.g. Agile Web Development with Rails) so maybe it is something particular to my machine. At any rate, I thought I’d point it out in case it is something that could be configured in your PDF files. | 2010-02-11 | I've passed this info on to the publisher. Thx. | |
42 | TYPO | In the fifth paragraph that begins “Inside the codebreaker directory”, the feature file name should be “codebreaker_starts_game.feature” as I’m pretty sure we’re breaking “codes”, not fish (“cods”). ;-) | 2010-02-03 | ||
60 | TYPO | #start (last but one line) is formatted green like a comment, but isn’t a comment. | 2010-02-03 | ||
61 | TYPO | Two lines with #start are formatted green like comments, but aren’t comments. | 2010-02-03 | ||
50 | TYPO | Second paragraph ends with “Here are the contents of the two files:” and there are no contents listed. | 2010-02-03 | ||
44 | SUGGEST | This is definitely nit-picking, but the feature’s explanation text is not parallel. I think it would read better as follows: For each number in the guess that matches the number and position of a number in the secret code, the mark includes one +. For each number in the guess that matches the number but not the position of a number in the secret code, the mark includes one -. The only change is the final phrase: “the mark includes one -.” | 2010-02-03 | ||
106 | TYPO | “documents it’s responsibility” s/b “documents its responsibility” | 2010-02-03 | ||
56 | TYPO | The second sentence of the “Then” section is problematic. BTW, the Existing Errata I am seeing doesn’t seem to match the page I’m looking at. In the RSpec book, the second sentence of the “Then” section that begins on page 55 is problematic. I believe it should read: The last snippet is a single step definition that will handle both the Then and And steps in the scenario, passing whatever is captured by the ([^\\"]*) part of the regular expression to the method block as the message parameter. I added a “the” before “([^\\”]*)“, removed a ”the" from between “regular expression” and “to the block”, and added the modifier “method” in front of the word “block” to make it more obvious which block we are dealing with. | 2010-02-03 | ||
75 | TYPO | Given /^the secret code is “([^\\”]*)"$/ do |secret| should be Given /^the secret code is “([^\\”]*)"$/ do |secret| Otherwise this code found on page 78 When /^I guess “([^\\”]*)"$/ do |guess| will return different results then shown because @game will be nil. | 2010-02-03 | ||
286 | TYPO | In the paragraph that starts with “Cucumber makes it easy…”. “Cucumber makes it easy for us to do this, but allowing us to invoke from within step definitions.” Should this be: “Cucumber makes it easy for us to do this, by allowing us to invoke from within step definitions.”? The ‘but’ should be ‘by’. | 2010-02-03 | ||
286 | TYPO | Same paragraph as above: “Cucumber makes it easy…” “…four-step version above, we can can write a…” There are two cans back to back. | 2010-02-03 | ||
291 | TYPO | There is a type on the Scenario title. “three of a kind beast two pair” should be “three of a kind beats two pair” | 2010-02-03 | ||
292 | TYPO | In the middle of the first paragraph on the page: “…and stores the cell vlues in a…” should be “…and stores the cell values in a…” | 2010-02-03 | ||
63 | TYPO | The example on this page is supposed to be demonstrating a red or failing spec, but the text is blue. Probably would be good to actually see a red failing spec. | 2010-07-21 | ||
273 | ERROR | The sidebar states:
I believe this is Portuguese, not Japanese. | 2010-07-21 | ||
63 | ERROR | The last paragraph of section 5.2 indicates that I should see a FAILED-1 on the third line of the output, but I am not seeing this. The reason is that you give the command as: spec spec —color In order for the output to match what you have listed in the book, the command should be: spec spec —color —format nested | 2010-02-03 | ||
70 | TYPO | In the second clause of the second sentence of the paragraph that begins “The first call to let() defines…”, “return” should be “returned”: “…and that same value is return[ed] every subsequent time…” | 2010-02-03 | ||
71 | SUGGEST | The instruction to “chmod 755 bin/codebreaker” only applies to *nix systems… unless there was an instruction that I missed for Windows users to install and use Cygwin. :) Also, wouldn’t it be a bit safer to give the command as “chmod +x bin/codebreaker”? Or maybe that’s not available on all *nix systems. | 2010-02-03 | ||
79 | TYPO | Code snippet at top of page is missing the ‘@’ symbol in front of output. | 2010-02-03 | Take a look at p56 in beta 13. It shows an output() method that encapsulates the instance variable, so no @ is needed. | |
115 | TYPO | Fourth paragraph (including code snippet), fourth line, sentence beginning with “There is no long a” should be “There is no longer a”. | 2010-02-03 | ||
285 | TYPO | Duplicate “to” in second paragraph in chapter “19.2 World”: | 2010-02-03 | ||
115 | TYPO | “There is no long a 1 in the secret, so we move on to the 4 in the third position of the guess.” should be “There is no longer a 1 in the secret, so we move on to the 4 in the third position of the guess.” | 2010-02-03 | ||
79 | TYPO | Section 6.3, “What We’ve Learned” is empty. I’m pretty sure I learned something. :) | 2010-07-20 | ||
81 | ERROR | The output from my spec command does not match what is listed. Using the command: spec spec —color —format nested My output is: Codebreaker::Game 1) Finished in 0.005912 seconds 3 examples, 1 failure —- end of output —- Specifically, I don’t see the verbiage you have in your example: Double “output” received :puts with unexpected arguments —- end of output —- Upon further inspection, specifically of the trace in my output, I’m thinking there might be some configuration funkiness on my machine that is causing this? I remember seeing something about configuration that would give a listing of all output like I see in your example. I just don’t remember if it was in the book or in other errata comments. | 2010-07-21 | ||
300 | TYPO | In section 20.2 (Setting up a Rails project), in the list of gems to install, it says: $ [sudo] gem install selenium-client —version 0.2.18 I suspect the selenium-client version is actually supposed to be 1.2.18. | 2010-02-03 | ||
83 | ERROR | The code example that comes after the paragraph that begins “The current implementation of guess always sends an empty string…” is incomplete and will not make the test pass. This is because the code references an instance variable, “@secret” that has never been defined. This code snippet should include adding a new line to the “start” method that stores the passed in “secret” in an instance variable: def start(secret) | 2010-07-21 | ||
85 | SUGGEST | This is nit-picking again, but… To maintain symmetry and improve readability, I would swap your order of secret and guess (so that it parallels the elsif check): def guess(guess) I know this code is throw away code, but it may not always be. So I prefer to make even (potential) throw-away code as readable as possible, especially when putting an example in a book. | 2010-02-03 | This is very subjective. I actually prefer the way it is in the book because we're saying "if the first number in the guess is the first number in the secret .." | |
87 | SUGGEST | Something is bothering me about the game.rb test cases. There is duplication in the line: game.start(‘1234’) It appears in every test case, yet I’m not sure refactoring that line out into a before method is a good idea. The more I thought about it, the more I realized that my hang-up was with the fact that we always used the same secret code. That seems like a test smell to me: we could end up with an implementation that would only work when the secret code is ‘1234’. So I think I would change the secret code for every test… or at least use more than one secret code in the test cases. | 2010-02-03 | I like your instinct, and might consider that if it weren't a teaching example. In an earlier version of the book there were some different codes and other beta readers expressed confusion about it :) | |
87 | ERROR | In implementing the loop in the guess method, why did you opt for Array#map? map creates an (unnecessary) new array containing the values returned by the block. Instead of: (0..3).map do |index| The correct method to use in this case is each: (0..3).each do |index| | 2010-02-03 | ||
259 | ERROR | I didn’t copy the example directly, but I adapted it to my own project and I found I needed to use ‘def’ instead of ‘define_method’ in my macros. | 2010-02-03 | ||
96 | ERROR | In the game.rb code example at the end of the page, the marker for a change to the code is wrong: nothing was change on the line: @output.puts ‘’*exact_match_count(guess) ’-’*number_match_count The only change to this method was the removal of a line of code: the declaration of the local variable exact_match_count at the beginning of the method. | 2010-02-03 | As the previous paragraph suggests, that line changes to pass the guess to the exact_match_count method. | |
97 | ERROR | In the code snippet showing the method exact_match_count, there is a change marker on the line: if exact_match?(guess, index) Nothing changed on this line of code as far as I can tell. | 2010-02-03 | ||
97 | TYPO | The last line of the page and the section has a typo: Run the specs and the should all pass. The second “the” should be “they”: Run the specs and they should all pass. | 2010-02-03 | ||
98 | TYPO | In the paragraph that begins “Briefly, what’s happening is that…” The word “iteration” in the last sentence of the paragraph should be “iterating”: The second block argument is the next value in the collection we’re Also, the “Briefly, what’s happening is that…” is a bit too conversational for my tastes. It reads a bit awkwardly (kind of like this sentence). Consider: Here is a brief explanation: the count variable is initialized… …or something. | 2010-02-03 | ||
100 | TYPO | In the bullet points beneath “Extract Class”, the slash should be removed from “as/is” in the third bullet point, yielding “as is”. | 2010-02-03 | ||
100 | TYPO | In the bullet points beneath “Extract Class”, the fourth bullet point incorrectly suggests passing the guess parameter to Marker.new. We should, in fact, be passing the secret instance variable to Marker.new. | 2010-02-03 | ||
106 | TYPO | The sentence “It’s still responsible for sending a mark to the output, but it’s no longer rep- sonsible for calculating the mark” has a spelling error: “repsonsible” should be “responsible” | 2010-02-03 | ||
106 | OK | I like the fact that you removed duplicate test cases from game_spec.rb. However, the single guess test case is a little simplistic. Why not test for something that covers all cases? Like: describe “#guess” do The advantage here would be a chance to catch a problem introduced in the marker_spec.rb test cases: maybe someone edits the marker_spec test cases so they aren’t providing the coverage needed. You’d at least have a chance of catching something at the game_spec level. | 2010-02-11 | The Game is no longer responsible for the mark, it is only responsible for sending the mark to the output. | |
79 | DEFER | When you introduce the game of Codebreaker you mention that “The code-maker, which will be played by the application we’re going to write, creates a secret code of four numbers between 1 and 6.” Since valid numbers are only between 1 and 6, why would we include scenarios that (seemingly arbitrarily) try guessing numbers above 6? Your scenarios: Scenarios: no matches Further, your rules differ from the Bulls and Cows game mentioned on Wikidpedia in that (later on in the book) you allow duplicate numbers in the secret code, and the original game rules state that “the digits must all be different” (they also seem to allow all digits, 1-9). This is suggested by your test scenarios on page 112: Scenarios: matches with duplicates This wasn’t confusing to me until I hit Chapter 9 (specifically section 9.1), when you went in a direction that seems counterintuitive to me, having referenced the original game rules, and comparing the written instructions to the examples. To be clear, I’m not bothered by your rules being different from the original game, I just think the examples lack some continuity, causing confusion for the reader… at list this reader spent a few befuddled minutes getting back on track. :) | 2010-07-21 | ||
116 | SUGGEST | Like I mentioned with your use of the map iterator method earlier, I really think the each iterator method is more appropriate in this case. This change would need to be made in both code snippets on the page. | 2010-02-03 | ||
149 | DEFER | In the RSpec examples earlier in the book, you pass a string parameter to “describe” that includes the pound/hash/number sign. Example: describe “#start” do Having used other BDD frameworks like JSpec and JBehave, it was not clear to me why the pound sign was prepended to the string. I’m guessing it is done to match the convention of Ruby’s ri documentation tool, but it might be nice to have this convention explained in this section of the book, where “describe” is explored in detail. | 2010-07-18 | ||
34 | TYPO | Looks like something is missing at the end of this paragraph: A - indicates a number match: one of the numbers in the guess is the same as one of the numbers in the secret code, but in a | 2010-02-03 | ||
56 | TYPO | Then /^I should see “([^\\”]*)" $/ do |message| Note the space in the text causes the output to differ from what is shown… | 2010-02-03 | It is correct in the PDF. What PDF viewer are you using? | |
50 | ERROR | I am getting the following error after I put in the second feature of the Mastermind game and run cucumber. features/codebreaker_submits_guess.feature:20:2: Parse error, expected “|”. (Cucumber::Parser::SyntaxError) It seems to be expecting another pipe but all looks good. Her is the code around line 20. With line 20 being the first line of the second scenario. Scenario: no matches \tScenarios: 1 number correct cucumber 0.6.2 | 2010-02-03 | I'm not getting this error. Please report it to the cucumber google group: http://groups.google.com/group/cukes. | |
47 | TYPO | Here’s the whole feature with thirteen scenarios expressed in a Scenario Outline: submit guess Scenarios: 3 numbers correct I think this is 14 in 27 | 2010-02-03 | ||
147 | SUGGEST | Maybe I missed the explanation somewhere in the book, but you mention that the “it” method accepts a string and an optional Hash along with the optional block. What is the Hash’s purpose? Shouldn’t there be an example of how to use the optional Hash parameter? I checked the ri documentation for RSpec, but that didn’t help a whole lot either. My next step will be to Google it, but it seems like this book has a responsibility to cover this feature. | 2010-07-18 | ||
60 | TYPO | I had to play with the $LOAD_PATH to get this command to work: Ubuntu: spec_helper.rb: game_spec.rb: | 2010-02-03 | The current version of rspec, 1.3, add lib to the load path. Are you using an older version? | |
267 | TYPO | At page footer: langauges should be languages | 2010-02-03 | ||
276 | TYPO | There is an extra “about” in the last sentence of the second paragraph; “for now, let’s talk about about the step keywords.” | 2010-02-03 | ||
83 | SUGGEST | At some point in section 7.1 we need to update the start method by adding @secret = secret. I don’t think you tell us that. I figured it out by debugging an error but I thought I’d let you know. def start(secret) Love the book! | 2010-07-21 | ||
102 | OK | marker = Marker.new(@secret, guess) | 2010-02-03 | There is no local variable there - the @secret _is_ an instance variable. | |
20 | OK | Getting the words right “We believe that most of the problems that software development teams face are communication problems, and so are the rest.” The rest of what??? | 2010-02-03 | The rest of the problems! (it's a bit tongue in cheek) \n | |
29 | ERROR | Hello Cucumber I have a big problem with this sentence, because it leads one to falsely believe that hello/spec/greeter_spec.rb is somehow necessary for the Hello Cucumber example. It took me several reads to realize it is not necessary. You can rework the text on page 32 to include creating the spec directory and moving the file. Then you can demonstrate how one has both Cucumber and RSpec working examples in a shared directory structure. | 2010-07-21 | ||
34 | OK | Suggest reworking the first sentence to read as follows: | 2010-02-03 | ||
34 | SUGGEST | Suggest changing your example to make it really clear (or really difficult to confuse) that the ‘+’ and ‘-’ do not correspond to positions: “For example, given a secret code of 1234, a guess of 2536 would be marked ‘+-’” The two, earning a ‘-’, is first in sequence, but marked second, and the three is later in the sequence, but marked ‘+’ first. | 2010-02-03 | ||
319 | TYPO | “Once those additions and changes are in place, re-running our scenario shows us that we’ve got one step left:1” “Once those additions and changes are in place, re-run the scenario and you’ll see that we’ve got one step left” Redundant sentences. | 2010-07-21 | ||
359 | ERROR | In the section “Extracting Partials for Organization”, should the second paragraph’s last sentence be changed to “… to rely on a recent_messages local variable rather than on an instance variable.” since the next section refers to it as a local? | 2010-07-21 | ||
135 | OK | behaviour should be behavior | 2010-02-03 | We use the British spelling for behaviour since it's in the title of the book. | |
34 | SUGGEST | 3.1 Introducing Codebreaker, 4th paragraph : For example, given a secret code … In B12, I made a wrong assumption about the black marker and the green peg in the second position. I read the new chapter 3 and again believe that the + comes first because it corresponds to the ones. Even if the next paragraph makes it clear that there is no particular order, I agree with #42184. So it would read : For example, given a secret code 1234, a guess with 2536 would earn a -. The is for the 3 in the third position in the guess, … Sounds that 3 is bound to third position ? I had an idea to completely scramble/mix up numbers and positions : For example, given a secret code 1236, a guess with 2456 would earn a + … but it no longer corresponds to all the examples with 1234. What a headache ! | 2010-02-03 | ||
47 | SUGGEST | Scenarios: no matches Isn’t 78 in contradiction with 3.1 page 34 second paragraph : the code-breaker makes a guess of four numbers (again, 1 to 6) ? | 2010-02-11 | ||
51 | DEFER | Suggest to put the figure 4-1 back. Reason : as I tried running cb/04 (old code) on page 55, I was stuck with require errors and wanted to check if my directory structure is correct, but couldn’t find the figure, which has been removed from B13. | 2010-07-18 | ||
234 | DEFER | Last paragraph : By default, the spec command only loads files ending with _spec.rb. As you’ll see later in this chapter, … you can configure RSpec … I haven’t found an explicit explanation in the rest of the chapter. Suggestion if it is not elsewhere : By default, the spec command only loads files ending with _spec.rb. While this pattern is the convention, you can configure RSpec to load files based on any pattern you choose. For example, if your files end with _t.rb, add the following option : \t\t—pattern *_t.rb | 2010-07-21 | ||
240 | SUGGEST | Paragraph “Invoke With Options Stored in a File with –options” Suggestion : give also the short form of —options, which is uppercase -O. Reason : having read the book “Scripted GUI testing” before, I used to run the tests with the command : After having read this paragraph and created the spec.opts file, I naturally gave the command : … and it did not work ! | 2010-07-21 | ||
118 | TYPO | starting poing for continued development. | 2010-02-03 | ||
291 | TYPO | Scenario: three of a kind beast two pair Should be “beats” | 2010-02-03 | ||
C | TYPO | This seems to be a snippet from the original (b.12) codebreaker example. | 2010-07-20 | ||
279 | TYPO | In Section 18.10, Organizing Features, second paragraph, last sentence, change from: “as described earlier in Section 19.5” to: “as described later in Section 19.5”. | 2010-02-03 | ||
281 | TYPO | In Section 18.11, Tags, under heading “Tags to the rescue”, in the last example, change from: “OR NOT tagged with bar” to: “OR NOT tagged with @bar”. | 2010-02-03 | ||
273 | TYPO | It´s portuguese on the sidebar and it has some character-encoding related error. The phrase should be: Ele é português. | 2010-07-21 | ||
367 | TYPO | The fourth paragraph below the section 24.5 header (including code samples), second line reads; “To see this in action, create a spec/helpers/roles.rb file.” Shouldn’t that be spec/helpers/application_helper_spec.rb? | 2010-07-21 | ||
378 | TYPO | last sentence on page reads; “Let’s look a closer at each of the methods we used.” | 2010-02-03 | ||
78 | ERROR | in cb2/19/features/step_definitions/codebreaker_steps.rb, your When instantiates Game with a local variable (game = Codebreaker::Game.new(output)). On the next page, in cb2/20/features/step_definitions/codebreaker_steps.rb, your When refers to the Game object as an instance variable (@game.guess(guess)). This doesn’t work, resulting in a confusing error: “undefined method ‘guess’ for nil:NilClass”. If the Game object is instantiated with an instance variable, then the example works as described on page 78. | 2010-02-03 | ||
136 | TYPO | Second parapgrah: “…, as you should already have a decent feel for how to do go about it”. The “how to do go about it” should be “how to do it” | 2010-07-20 | ||
61 | ERROR | I had to change spec/spec_helper.rb to include the following to get the spec to run $LOAD_PATH << File.expand_path(‘../../codebreaker/lib’, FILE) prior to the require ‘codebreaker’ | 2010-02-03 | The current version of rspec, 1.3, add lib to the load path. Are you using an older version? | |
167 | TYPO | - One goal BDD is getting the words right. It occurs to me now that this might be a joke, but I suspect that the humor will be lost on many readers who will assume that it’s a typo. | 2010-02-03 | ||
118 | TYPO | “To be clear, this << | 2010-02-03 | ||
47 | SUGGEST | From the Scenario Outline on this page you can infer that the mark will always print the +’s before the -’s. But this fact is never explicitly stated anywhere. And in fact, I completely missed it on my first run through. It wasn’t until the later chapter where you deal with duplicates that I realized the rule was already implied. Is there some way that the Cucumber could updated to make this rule explicit in order to avoid confusion and increase communication? It could be added to the feature description, but it seems like it would be even better if it actually became an explicitly stated rule of its own. Is this possible? Thanks! | 2010-02-11 | ||
90 | TYPO | “Learned” is misspelled as “leared” in the last sentence before section 7.4, a sentence that also incorrectly separates “meantime” into “mean time”: “In the mean time, let’s review what we’ve leared so far.” Since Shakespeare is the only person who ever Leared in the (Greenwich) Mean Time, the book should probably target the rest of us and the learning we do in the meantime. | 2010-02-11 | ||
92 | SUGGEST | You begin Chapter 8 with nearly the same Fowler quote that you began section 5.4 with, though they are different in their wording: 5.4 Chapter 8 Reading the quote in chapter 8, it feels as if the authors have unintentionally repeated themselves, even though the second quote adds some new ideas. Maybe it should be introduced in a way that acknowledges that Fowler has already been mentioned, then says that Fowler further defines refactoring as such and such (using the quote). | 2010-07-20 | ||
178 | TYPO | In Ruby, there are two values that are evaluate as false in a boolean expression. Change “are evaluate” to “evaluate.” | 2010-02-11 | ||
54 | SUGGEST | On page 54 of B13, the last line of the output of the example cucumber run from the page before is listed directly below the sidebar. Because it’s a single line, it would probably be a good thing to find a way to put it with the rest of the output. “0m0.003s” looks pretty odd after the sidebar, especially considering the page content doesn’t describe that line at all. | 2010-02-11 | This will be addressed in typesetting. | |
327 | TYPO | Missing space: “By default, Rails’ TestUploadedFile uses the text/plainMIME type.” Should be: “By default, Rails’ TestUploadedFile uses the text/plain MIME type.” | 2010-07-21 | ||
345 | TYPO | “If anything behaves differently, it’s a pointer to an inadvertent external dependency that has crept it.” Should be: “If anything behaves differently, it’s a pointer to an inadvertent external dependency that has crept in.” | 2010-07-21 | ||
90 | TYPO | Along with the “leared” typo, the sentence lacks its final dot. | 2010-02-11 | ||
100 | ERROR | “Create a new Marker in the guess method, passing its guess parameter to Marker.new”: actually, the parameter is @secret. | 2010-02-11 | ||
44 | SUGGEST | Some where in the “Submit a Guess” subsection, add a sentence telling the reader to create a new file named codebreaker_submits_guess.feature. | 2010-07-20 | ||
171 | TYPO | The code sample after “Here are some examples:” has one empty line you may get rid of. | 2010-07-18 | ||
169 | SUGGEST | “In addition to equal(expected), others include: The repetition sounds clunky. You may change for something smoother, say “In addition to equal(expected), you may use:” | 2010-07-18 | ||
280 | ERROR | The Tag | 2010-07-21 | ||
56 | OK | I’m reading the .mobi version of the book, and got quite confused about where to put ‘class Output’. Upon looking at the pdf version, it became immediately clear that ‘class Output’ belongs in features/step definitions/codebreaker_steps.rb, but that information is omitted on the .mobi version. Could this be added in the next release? (I can imagine this impacting all of my reading of the book, as well as other books by PragProg, etc.) | 2010-07-20 | Dave says: Is there not a hyperlink about the code fragment—I see it here when reading the mobi version | |
70 | SUGGEST | Flag changed lines in first code block for consistency. | 2010-07-21 | ||
77 | TYPO | Per the fifth errata on page 75, the code change (which makes game an instance variable) would have a corresponding change on page 77. | 2010-07-21 | ||
77 | ERROR | Per the fifth errata on page 75, the code change (which makes game an instance variable) would have a corresponding change on page 77. | 2010-07-21 | ||
340 | TYPO | when setting up database cleaner with selenium - it suggests adding the following lines to features/support/env.rb: the 1st and 3rd of these lines have been included on the examples previously given on page 338 - someone following along would already have added them in… suggest removing from the earlier examples. Cheers, | 2010-07-21 | ||
55 | OK | Great book! in cb2/04/features/support/env.rb Although it doesn’t affect the outcome of the examples, the following statement is incorrect: $LOAD_PATH << File.expand_path(‘../../../lib’, FILE) It should be the following: $LOAD_PATH << File.expand_path(‘../../lib’, File.dirname(FILE)) Notice there are only two ‘..’ in the latter, since it doesn’t erroneously consider FILE to be a directory name instead of a file name. | 2010-07-18 | ||
56 | TYPO | First paragraph “the regular expression the to the block” which should be “the regular expression to the block” (remove first “the”) | 2010-06-15 | ||
57 | DEFER | With MRI 1.9, running cucumber does not say ‘wrong number of arguments (1 for 0)’ as menthioned in this page. Ruby 1.9’s Object#initialize(inherited from BasicObject) accepts any number of arguments(arity returns –1) while 1.8’s accepts none(arity returns 0) | 2010-07-21 | The examples are all written against 1.8. I'll note that in the beginning of the book. | |
60 | DEFER | Output of Ruby 1.9 differ. $ spec spec/codebreaker/game_spec.rb —format nested 1) 2) | 2010-07-21 | The examples are all written against 1.8. I'll note that in the beginning of the book. | |
100 | ERROR | Third bulletpoint “Create a new Marker in the guess method, passing its guess parameter to Marker.new” should be: “Create a new Marker in the guess method, passing @secret to Marker.new” The code example that follows the instructions is correct. | 2010-07-21 | ||
45 | TYPO | Placeholders are not quoted. Quoted later (p.47) without mention. | 2010-07-21 | ||
75 | ERROR | The following line did not work for me Given /^the secret code is “([^\\”]*)" $/ do |secret| Running cucumber would still give me: Given /^the secret code is 1234$/ do However, when I removed the quotes from around the parentheses as follows, it works fine: Given /^the secret code is ([^\\"]*)$/ do |secret| cucumber v0.6.2 with ruby 1.9.1 (it might be a ruby 1.9 thing) | 2010-07-21 | ||
54 | SUGGEST | last line on the page - “Create a lib directory with a codebreaker subdirectory, and add a game.rb file in lib/codebreaker with the following:” Since lib exists as a standard directory with directories associated with each application It’s confusing. Better would be: | 2010-07-18 | ||
97 | TYPO | 4th line of page indicates a right pointing triangle denote change. It hasn’t changed from previous incarnation. | 2010-07-21 | ||
310 | TYPO | For the code snipped labelled “Download cucumber_rails/01/features/step_definitions/showtime_steps.rb” — the letters “fi” in “step_definitions” morphed into a ligature (they’re run together as a single Unicode character). So when you click or copy/paste the “cucumber_rails/01/features/step_definitions/showtime_steps.rb” path in the PDF, it can’t find it. | 2010-07-21 | ||
54 | TYPO | In the first paragraph after the sidebar, last sentence, you are missing the word “a”. It should read, “… because it has a failing step.” | 2010-07-20 | ||
54 | SUGGEST | In the last paragraph, second sentence, it would probably read better if you said, “… which also calls the start( ) method, …”. | 2010-07-18 | The book hasn't been through copy-edit yet. Wording issues like this will be addressed when we get there. | |
382 | ERROR | I get a different error (using rspec 1.3.0, rspec-rails 1.3.2) : 1) Finished in 0.765615 seconds 1 example, 1 failure C:\\data\\donp\\NetBeansProjects\\temp\\views_example> | 2010-07-21 | ||
363 | SUGGEST | Fails to mention a line that needs to be edited for the “renders a form to update a message” case :action => message_path(@message) is different It seems to me that there should be a little arrow pointing out this line. When I copy/ pasted the ‘new record’ example and edited it, I missed this line. | 2010-07-21 | ||
176 | TYPO | In the first paragraph of the section titled “Expecting a Throw”, the second sentence does not read right. It should probably be, “The main difference is that we use throw/catch to express expected circumstances as opposed to exceptional circumstances.” | 2010-07-21 | ||
178 | TYPO | In the first sentence on the page, it looks like the word “is” is missing after the word “intention”. So the beginning of the sentence should read, “While that does express what our intention is, …”. | 2010-07-21 | ||
182 | TYPO | In the third paragraph, last sentence, the word “on” is missing after the word “based”. So the end of the sentence should read, “… the example passes or fails based on the outcome of that comparison.” | 2010-07-21 | ||
203 | TYPO | The “hash_not_including()” heading occurs between the example of hash_including() and the sentence describing the hash_including() example. The heading should be moved down one paragraph. | 2010-07-21 | ||
233 | TYPO | The section title in the PDF table of contents for “The spec Command” shows up as “The 4-1spec Command”. | 2010-07-21 | ||
245 | TYPO | At the end of the sidebar, you say, “… everything is honky-dory.” In my neck of the woods, we say everything is hunky-dory. Honky refers to a white dude. (I guess I failed the PC test) | 2010-07-21 | Awesome catch! Thanks. | |
253 | TYPO | In the 6th paragraph of the Matcher DSL section, first sentence, you have, “… creates a in instance of …”. I believe you meant to say “… creates an instance of …”. | 2010-07-21 | ||
261 | TYPO | In the description for the example_pending(example_proxy, message) method, last sentence, you refer to the (as yet) unwritten sec.pending section. Is this a reference to section 12.2 Pending Examples which has already been written? | 2010-07-21 | ||
277 | TYPO | In the second paragraph, last sentence, the word “a” is missing. The sentence should read, “Better to put that in a separate scenario.” | 2010-07-21 | ||
275 | TYPO | In the PDF table of contents for section 18.7 The cucumber Command, it has, “The 4-1cucumber Command”. | 2010-07-21 | ||
287 | TYPO | In the last paragraph of the “Joe Asks” sidebar, toward the end of the second sentence, you have, “… make it easier to understand reuse a step definition.” It seems to me that you should only have “understand” or “reuse”. If you meant to have both words, then maybe you should say “understand/reuse”. | 2010-07-21 | ||
53 | SUGGEST | In “Given /^I am not yet playing$/ do”, not is formatted as a Ruby keyword when it is just there as part of the regexp. | 2010-07-21 | Dave Thomas: Indeed—I'm afraid our syntax highlighter can be dumb on occasions. It isn't a simple fix, so we're going to punt on this one. | |
341 | TYPO | In the 2nd para, “One of Webrat’s goals is to ensure the programmer maintains the full power of it’s underlying tools” should use its, not it’s. | 2010-07-21 | ||
116 | DEFER | In ruby 1.9, it fails with If this book is focusing ruby 1.8.x, that fact should be explicitly mentioned in Preface, near Gem versions section. | 2010-07-21 | The examples are all written against 1.8. I'll note that in the beginning of the book. | |
60 | TYPO | ‘gem_original_require’: no such file to load — spec_helper (LoadError) | 2010-07-21 | ||
371 | TYPO | In the quote in the header, “When the steak dinner is ready the waiter delivers it the customer for her enjoyment.” should read “…delivers it to the customer…”. | 2010-07-21 | ||
56 | OK | This is a repeat but you asked for more information and don’t appear to have gotten it. The code snippet below contains a space after the regular expression causing the output to differ from the expected value. This is in Adobe Acrobat 8. You don’t notice there’s a space between the " and the $/ until you copy and paste the code into an editor. Someone typing the snippet while reading would likely not see the space. Then /^I should see “([^\\”]*)" $/ do |message| | 2010-07-21 | We've tried to reproduce this in Acrobat (Windowss) and Preview (Mac) and can not. I do not see the space there, nor should it be there. | |
88 | TYPO | On the middle of this page, the following sentence misses an “it”: “The 2 in the first position of the guess is a number match, so gets…”. Should be: “The 2 in the first position of the guess is a number match, so it gets…” | 2010-07-20 | ||
55 | TYPO | This is the wrong output. “Now run cucumber again, and you should see some different | 2010-07-21 | ||
57 | TYPO | ‘expected []to include “Welcome to Codebreaker!”’ not in output. | 2010-07-18 | ||
57 | TYPO | ‘expected []to include “Welcome to Codebreaker!”’ not in output. Opps… (#42441) should be removed…nothing wrong. It was my mistake. | 2010-07-18 | ||
57 | DEFER | Scenario: start game Ruby 1.8.7 Ruby 1.9.1 | 2010-07-21 | The examples are all written against 1.8. I'll note that in the beginning of the book. | |
300 | OK | After installing cucumber and rspec gems, when runnin script/generate cucumber —rpsec —webrat I get the following error: invalid option: —rpsec | 2010-07-21 | That's because it's spelled rspec, not rpsec :) | |
356 | TYPO | 2nd paragraph from bottom of page reads “… rspec-rails offers us alternative …” Should be " … rspec-rails offers us an alternative …" | 2010-07-21 | ||
31 | OK | The class CucumberGreeter has a method named “greet” in the greeter_steps.rb file listed on page 31 (I have not checked the downloaded code). The “Then” cucumber step definition states “@message.should == greeting” which fails. This failure is not show in the books output, the book states that this successfully runs. Either the classes method needs to be changed to “greeting” or the cucumber step definition needs to be changed to “greet”. The output displayed at the bottom of page 31 and the top of page 32 does not reflect this error, it shows a successful run from the “cucumber features” command. | 2010-07-21 | In "@message.should == greeting", 'greeting' refers to the block argument in the step definition. It works as advertised if you copy everything verbatim. | |
34 | TYPO | "A - indicates a number match : one of the numbers in the guess is the same as one of the numbers in the secret code, but in a For example, given a secret code 1234, a guess with 1456 would earn a In the snippet above, the paragraph ends with “but in a” | 2010-06-15 | ||
50 | TYPO | "At this point, the feature files should be in the features/ directory, each with the .feature file extension. Cucumber recognizes this extension and treats these files as input. Here are the contents of the two files: We should also have an env.rb file in features/support directory. The .rb extension tells Cucumber that we’re using Ruby." The first paragraph ends with “Here are the contents of the two files:” but never lists the contents. | 2010-07-20 | ||
55 | OK | According to the text on this page, the below snippet is supposed to be added to the file “lib/codebreaker.rb” require ‘codebreaker/game’ Yet this page states that the below snippet is to be added to the file “features/support/env.rb” $LOAD_PATH << File.expand_path(‘../../../lib’, FILE) The File.expand_path includes the lib directory so when running this example, it errors since our codebreaker.rb files tells us to “require ‘codebreaker/game’” this should be changed to “require ‘game’” to properly run. | 2010-07-21 | ||
309 | ERROR | Contrary to the suggestion about the tag focus option: run script/cucumber —tag @focus shows script/cucumber —tag focus 0 scenarios It runs nothing, not even the scenario marked as focus as suggested. | 2010-07-21 | ||
339 | ERROR | On Snow Leopard 10.6.2 with the following gems: webrat 0.7.0 Using Firefox 3.6.2 (OR thru safari) | 2010-07-21 | ||
118 | TYPO | Cucumber scenarios, and used them as our starting “poing” should be “point” | 2010-07-18 | ||
393 | ERROR | It suggests adding a relationship to recipient as: class Message < ActiveRecord::Base It then suggests that the test will fail on expected valid, but in fact fails on uninitialized constant Message::User As we’ve yet to define a User object, this makes sense. | 2010-07-25 | ||
155 | TYPO | “We’ll talk about grouping by method later this chapter.” The “later this chapter” part, should be something similar to “later IN this chapter” | 2010-07-18 | ||
34 | TYPO | The line below on that page is incomplete : | 2010-06-15 | ||
270 | TYPO | First sentence, second paragraph. “an example from a a photo editing system” | 2010-07-21 | ||
149 | ERROR | In the output of the fourth example of usage of “describe”, the words “require” and “and” should not be highlighted. | 2010-07-21 | Dave Thomas: Indeed—I'm afraid our syntax highlighter can be dumb on occasions. It isn't a simple fix, so we're going to punt on this one. | |
159 | SUGGEST | Maybe you should use mail@example.com instead of e@mail.com. The example.com domain is intended for exactly that purpose, but e@mail.com might as well really exist. | 2010-07-18 | ||
178 | TYPO | Boolean, not boolean | 2010-07-18 | ||
171 | ERROR | The section “Do not use !=” says that != isn’t a method in Ruby, which is not entirely true because in newer versions, in fact, it is: $ ruby -v -e “p Object.new.respond_to?(:!=)” | 2010-07-21 | ||
40 | SUGGEST | “So now we have our release plan with three stories.” - Do we? On page 38, we had identified 4 stories, then discovered a potential 5th story on page 39 on the need for a secret code. The preceding “User Stories are a Planning Tool” doesn’t shed any light on how we arrived at three stories and it’s not clear what those three stories are. | 2010-07-20 | ||
273 | TYPO | It says “if you want to use Japanese, the first 2 lines might look like this:” and then the following example is in Portugese (and there seems to be an encoding problem too, because the non-ascii letters in the example have become two letters each: “Ãl” and “Ãł” should probably have been “é” and “ê”). | 2010-07-21 | ||
383 | TYPO | 25.3 FAQ That should be ‘linchpins’. Linch is a right-angle projection; a linchpin can hold two things together such as a tractor and a trailer. Lynch is to kill. | 2010-07-21 | ||
31 | TYPO | this line has an embedded space between the final " and the $, and with this space in place, cutting and pasting from the pdf to the rb (and then running “cucumber features”) causes the “Then” to be seen as “undefined”. Removing the space allows the “Then” to pass. | 2010-06-15 | I think that this is an artifact of whatever PDF reader you are using. The text is correct (missing the space) before it is processed, and I don't see the space when I look at it the PDF using Preview on a Mac. | |
80 | TYPO | s/responsility/responsibility/ | 2010-07-20 | ||
348 | TYPO | To include webrat, it should be require ‘webrat/integrations/rspec-rails’ and not require ‘webrat/integration/rspec-rails’ | 2010-07-21 | ||
271 | TYPO | “Considering acceptance to be contextual is not a without its costs.”. An ‘a’ seems to have crept in. | 2010-07-21 | ||
184 | TYPO | Item 13.7, First paragraph. There is an “a” that is not needed: Sometimes we end up with a an example … | 2010-07-21 | ||
35 | TYPO | In the following sentence, you don’t need the comma: “These are also very high level, and don’t really tell us much about how the system should respond to these actions.” | 2010-06-15 | ||
54 | TYPO | Two “with”s in the following sentence are confusing: “It is very liberating, and it results in more usable APIs than I would have come up with starting with the object receiving the message.” | 2010-07-18 | The book hasn't been through copyedit yet. Wording issues like this will be addressed when we get there. | |
383 | ERROR | hi i get an undefined method `controller_name’ error views_example/spec/controllers/application_controller_spec.rb:9:in `block in <top (required)>‘: undefined method `controller_name’ for Spec::Example::ExampleGroup::Subclass_1:Class (NoMethodError) rails (2.3.5) | 2010-07-21 | ||
389 | TYPO | Chapter 26 :: Writing Model Specs :: Making it real | 2010-07-21 | ||
161 | SUGGEST | In the section titled “Sharing Examples in a Module”, the first sentence begins “In addition to share_examples_for( )…” refers to the ‘share_examples_for’ method while in the previous code listing the method is named ‘shared_examples_for’. While the ‘shared’ variation is only an alias for the ‘share’ version, this seems inconsistent and could lead to minor confusion. | 2010-07-18 | ||
57 | OK | Currently reads memoization, but I think it probably needs to be “memorization”. It’s in the first line of that page (57). | 2010-07-18 | Memoization is correct: http://lmgtfy.com/?q=memoization | |
40 | TYPO | Section 3.3, 2nd paragraph: ATDD should be ATDP | 2010-06-16 | That's talking about ATDD in order to set up the difference between it and ATDP. Fine as/is | |
199 | TYPO | s/use it several examples/use it in several examples/ | 2010-07-21 | ||
279 | SUGGEST | “as described earlier in Section 19.5, Background, on page 289.” should probably read “as will be described later in Section 19.5, Background, on page 289.” | 2010-07-21 | ||
62 | DEFER | With ruby 1.9.1p378 and rspec 2.0.0.beta.8, I had to specify: game = Codebreaker::Game.new(output) or I receive: Failure/Error: game = Game.new(output) for the initialization of the Game class in game_spec.rb | 2010-07-21 | The examples are all written against 1.8. I'll note that in the beginning of the book. | |
71 | TYPO | At the end of section 5.4, on this page, it states: “By the end of the next chapter, you’ll actually be able to play the game!” but at the end of Chapter 6, you are not able to play the game. | 2010-07-20 | ||
301 | TYPO | The bullet point starting: | 2010-07-21 | ||
27 | SUGGEST | Attempting to install cucumber reveals that gherkin is listed as a dependency: metatron:~ james$ sudo gem install cucumber sudo gem install gherkin solves the problem quite nicely, but it may be good to explicitly list the gherkin dependency in the text. | 2010-06-15 | This is resolved in cucumber and, in an effort to keep the book valid for a long time forward (during which cucumber is unlikely to be renamed, but its dependencies might change), I'm going to leave it as/is. | |
416 | TYPO | Under Contracts, Have: Should be: | 2010-07-21 | ||
42 | TYPO | 5th paragraph, 2nd line. “codbreaker_starts_game.feature”. Missing ‘e’, should be “codebreaker_starts_game.feature” . | 2010-06-16 | ||
267 | TYPO | In section 18.1, 4th paragraph, the last few words, “through it’s APIs” s/b “through its APIs.” | 2010-07-21 | ||
269 | SUGGEST | I think the Connextra Format section needs to be removed and replaced with one explaining the “In order to…” format or an additional section explaining this format’s origin needs to be added. The problem is that the book explains Connextra but then goes on to use examples using the alternate format, with no introduction to it since way back on page 142. This is probably just a leftover from the previous Beta books that used the Connextra format. | 2010-07-21 | ||
63 | TYPO | “The next line sets up a message expectation: an expectation that the output object should receive the puts messsage with the string ’Welcome to Codebreaker!’ as its only argument.” The second ‘message’ has an extra ‘s’. | 2010-07-20 | ||
62 | ERROR | require ‘spec’ is not needed in the following code block: $LOAD_PATH << File.join(File.dirname(FILE),“..” ,“lib” ) | 2010-07-21 | ||
52 | ERROR | In the last section on the page, the text states “…so in this example the And() on the last line…” The previous example has only Given(), When() and Then() “fragments.” | 2010-06-16 | Formatting problem - the And falls on the top of the next page. Should be resolved before printing. | |
50 | OK | The second paragraph states “Here are the contents of the two files:” I was unclear if this introduction was the appropriate place for a code listing or if a reference (link) to the previous chapter would suffice. | 2010-07-18 | ||
52 | DEFER | The first paragraph of the second section states: “The last two, And() and But() take on the meaning of the previous Given(), When() or Then()….” When I thought about this as a programmer, I wondered, “If Cucumber only hashes the block with the regular expression, how does it distinguish two identical regular expressions occurring in a different context (for example, one after a When() and one after a Then()).” Although this may be a technical Cucumber question, and although it may never occur in practice, addressing it with a footnote might help readers to know that it was considered. | 2010-07-18 | ||
52 | DEFER | The last line of the first paragraph in the second section states: “…the And() on the last line of the scenario is treated as a Then().” When I first read this fragment, I understood it as described in the previous chapter: merely a convention. However, when I put on my developer hat and thought about how I might use Cucumber, I asked myself, “Do I need to translate my textual ”Ands" and “Buts” into “Thens” and “Whens” when I use Cucumber?" On further reading, I believe I do not, but I am uncertain without even more reading. It might be nice to clarify more of how this works (or refer to a future section for more details). | 2010-07-18 | ||
54 | TYPO | The last sentence on the page states: “Create a lib directory with a codebreaker subdirectory…” I could not quite picture the directory structure that we need to create. Because I’m a visual person who likes the big picture before details, I would find a sidebar describing at least the standard Cucumber directory structure (no files, just directories) either here or perhaps earlier in the book. | 2010-07-18 | ||
286 | 286 | OK | I believe that I’ve discovered an error at this late stage—but I could be wrong. Doesn’t the scenario steps ‘repeating’ snippet example given in section 19.3 need to use “And” instead of “When” (repeated four times) at the bottom of page 286 and top or 287? IOW, where you have: (Bottom of 286:) ? Of course the first ‘When’ at the top is correct—THIS IS CORRECT HERE: | 2010-07-21 | Given, When, Then, And, and But are all interchangeable. |
300 | TYPO | This line: Should be: $ [sudo] gem install selenium-client —version 1.2.18 (Or whatever version you’re using to test all the code in chapters 20 onwards. There is no version 0.2.18 of selenium-client, but there is a 1.2.18, so I assume that’s the one you meant.) | 2010-07-21 | ||
34 | SUGGEST | We begin this chapter by describing an “exact match” and “number match”; however, these phrases become the more generic phrase “correct” throughout much of the remainder of the chapter. I found this change difficult. I was continually asking myself, “Does correct mean an exact match or only a number match.” I think the chapter becomes easier to understand if we use these two terms rather than the more generic “correct.” | 2010-06-15 | "correct" refers to a mix of exact and number matches. I swapped in the word "match" or "matching", where appropriate, and I think it's a nice improvement. Thanks. | |
34 | TYPO | The last paragraph in the first section states: “What we don’t know is which three are in the guess…” Should this be “…in the code…” (since the player knows that guess she made)? | 2010-07-20 | ||
42 | OK | The footnote, number 7, indicates that Cucumber supports several languages. Do we want to either list these languages here, or add a reference in the footnote where an interested reader can find these additional languages? | 2010-07-18 | ||
43 | OK | The feature description at the bottom of the page uses the word “number.” Although technically accurate, I found myself (with a math/physics background) having to remember that “number” did not describe the complete 4-digit number but only a single digit. Might the term “digit” better communicate our intent? | 2010-07-18 | ||
44 | SUGGEST | The last sentence on the page reads “Let’s add more scenarios with all four number correct…” When I read that, I thought “four matching numbers in the correct positions” (since that is my goal). However, we intend to describe situations in which we have guessed four matching digits but have not yet determined the matching positions. Might this be better phrased by adding, “…but, perhaps, not in the correct position”? Or by using the technical term “four number (or digit) matches”? | 2010-06-16 | ||
45 | SUGGEST | The fourth paragraph uses the term “localization.” When I first read this word, I thought of localization in the context of internationalization; however, I do not believe that this is the intended use here (although the Cucumber community may use this term in a special way). If it is not the general use of localization (within i18n), do we need to define how we plan to use it? | 2010-06-16 | Changed to 'cohesion'. | |
45 | TYPO | Footnote number 8 is on the word “localization”; however, the footnote describes the DRY principle. I believe the footnote should be on the word “DRY’ing.” | 2010-06-16 | Editor likes footnotes at the end of sentences. Leaving as/is. | |
46 | SUGGEST | The first paragraph of the second section states “…all four number are correct….” Might the term “match” be clearer than “are correct”? | 2010-06-16 | ||
47 | DEFER | The first paragraph states: “…the placeholders are bound by position….” Will we eventually learn how Cucumber binds by position? | 2010-07-18 | ||
47 | OK | The Scenario Outline at the bottom of the page puts double quotation marks around each placeholder. For example, it says, ‘Given the secret code is “ I do not believe the double quotation marks are needed. | 2010-07-18 | ||
62 | DEFER | ruby 1.9.2dev (2010-05-13 revision 27783) [x86_64-darwin10] Failure/Error: | 2010-07-21 | The examples are all written against 1.8. I'll note that in the beginning of the book. | |
51 | OK | The sidebar entitled “Downloadable Files” is not referenced in the text (at least near its position). I thought it would be useful to have it referenced nearby. | 2010-07-18 | ||
52 | DEFER | The second paragraph describes the key to understand how Given(), When() and Then() work ‘under the hood.’ Do we need to explain this idea further here or to refer to another section for more details? | 2010-07-21 | ||
53 | SUGGEST | In the second paragraph of the second section, the book states “…writing the code we wish we had.” I think it would help to refer to the sidebar of page 54. | 2010-07-18 | ||
54 | SUGGEST | The last sentence on the page states: “Create a lib directory…” The first several times that I read this paragraph, I was unclear where to actually create this directory. Since we had primarily only referred to the features subdirectory, I though it should be within features, but it is actually a sibling to features. How can we clarify this directory structure? | 2010-07-18 | ||
55 | DEFER | The third paragraph on the page begins “Cucumber will load features/support/env.rb….” I think this paragraph provides a great summary of what occurs at run time; however, it might be to have this explanation before the detailed instructions. Another alternative would be to introduce the detailed instructions with a summary of their purpose. | 2010-07-18 | ||
56 | TYPO | The first sentence on the page states: “…whatever is captured by ([^\\”]*) part…." I believe “the” is needed before the regular expression. | 2010-07-20 | ||
57 | OK | The first paragraph of this page explains the Output.output method. I do not understand the reason for needing the memoization technique. In order to call output(), I must already have an instance of the Output class. When I call the output() method on this instance, I get a new instance. What is the reason for this technique? | 2010-07-21 | "In order to call output(), I must already have an instance of the Output class." That is not correct. You can call output() before the instance is created, which is what happens in the first code snippet on page 56. | |
57 | OK | The code example after the second paragraph contains the expression “game = Codebreaker::Game.new(output)” I am unclear where we define the variable “output.” In addition, when I actually run the code (not the downloaded code but the code I’ve been building with the book), Cucumber reports that “output” is undefined. | 2010-07-21 | It's the output defined in the last code snippet on the previous page. | |
60 | OK | The fourth paragraph describes the “parallel structures” of the directories. On my first reading, I had two questions about the structure. First, I found it difficult to “visualize” what this structure “looks like” (simply by reading). Second, I was unclear of the rationale behind the structure? Later, when I finally had access to a computer and could create the actual directory structure, I was able to “see” the created structure. Do we want readers to be able to visualize and rationalize the directory structure even without “following along” on a computer? | 2010-07-18 | ||
62 | OK | The last line of the next to the last paragraph says “…on the first line of the example.” I am unclear to what example this fragment refers. The code fragment on this page does not refer to “output” until line seven (if one counts blank lines). | 2010-07-18 | ||
67 | OK | In the fourth paragraph, we describe the Null Object design pattern by referring to PLoP3. I’m unclear how many readers will be familiar with this series. In addition, we may want to either refer to a page on the web or to Fowler’s description of a null object in the context of refactoring. | 2010-07-18 | ||
81 | ERROR | This expands upon erratum #42145 In the “sends a mark with ’’” step, the lines of code given do not provide the output reported. Given: Changing the order of the expressions causes the output to match that of the book: output.should_receive(:puts).with(’‘) | 2010-07-21 | ||
127 | TYPO | The following sentence: “Imagine for a moment that you could do this, namely providing production-quality software every two weeks” should read […], namely, provide production-quality […] i.e., there should be a comma after namely, and “providing” should be “provide” | 2010-07-18 | The book hasn't been through copy-edit yet. Wording issues like this will be addressed when we get there. | |
129 | TYPO | In the sentence: “Delivering production quality software week after week takes a lot of discipline and practice” “production quality” should probably be hyphenated, since it acts as a compound modifier to “software”. | 2010-07-18 | The book hasn't been through copyedit yet. Wording issues like this will be addressed when we get there. | |
(c) | TYPO | This “problem” will likely fix itself in the next printing. The copyright states: B13.0 printing, January 19, 2009 This should be 2010 | 2010-06-15 | ||
241 | SUGGEST | In the section describing autotest it is unclear whether or not you need to install the ZenTest library in order to use the autospec wrapper. (Actually, the “thin wrapper” bit should have been a dead giveaway, but somehow I drew the wrong conclusion — possibly because I had tab completion for “autospec” on the command line). Also the instructions to go to “the codebreaker directory that you created in chapter 4 on page 50” was a bit confusing — page 50 describes creating a features directory, not a codebreaker directory. Initially I tried going to the codebreaker project directory and calling autospec, but did not get any noticeable response. Thinking I was in the wrong codebreaker directory I checked to see if I had a features/codebreaker (nope), then tried spec/codebreaker (yepp, but still no response). The only codebreaker directory left to try was lib/codebreaker. I jumped back and forth in the book between page 241 and page 50 several times before concluding that I needed to install ZenTest. | 2010-07-21 | ||
46 | ERROR | The second bullet states “Variable data placeholders in Based on later sections of the book, I believe that the placeholders must be in | 2010-06-16 | They don't have to be. That's just a convention some follow - purely a matter of context and taste. | |
76 | DEFER | When I put on my “tester” hat, I did not see a problem adding an argument to the #start method. When I put on my “developer” hat, I was unclear of the rationale for adding the argument. Perhaps we need to explain the rationale for the actions we are about to take. | 2010-07-18 | ||
76 | SUGGEST | The first code fragment on the page simply adds a default argument to #start. When I first read this, I thought, “What! We’re adding a default argument simply to make a test pass?” On later reading, I understood it was part of the refactoring we were doing. I think if we explain our eventual goal early, it will avoid developers “dismissing” these techniques. | 2010-07-21 | ||
81 | ERROR | This is related to #42145. The output of the spec command an my machine differs as described in #42145; however, I believe the difference is due to calling #as_null_object. Not calling it produces the output in the book; calling it produces output like: | 2010-07-21 | ||
290 | SUGGEST | I believe self-hosted type of examples (i.e. examples where Cucumber/RSpec is used to define/test Cucumber/RSpec) shouldn’t be used throughout the book. They’re often hard to read because separation between Cucumber/RSpec specific things and things under test/being described isn’t immediately obvious. | 2010-07-21 | ||
156 | SUGGEST | This gets run once and only once in its own instance of Object | 2010-07-21 | ||
174 | SUGGEST | “puts hash.methods” You probably mean hash as any hash variable, but hash is also a Object method. It is more clear to say any_hash.methods | 2010-07-18 | ||
201 | ERROR | checking_account.should_receive(:transfer).with(50, savings_account) savings_account should be a string or a symbol | 2010-07-18 | ||
284 | TYPO | “You can implement step…” sentence should be in normal black text. | 2010-07-21 | ||
71 | TYPO | This might be confusing to Windows users; $ bin/codebreaker They need to enter: bin\\codebreaker | 2010-07-21 | ||
173 | SUGGEST | Beginning on page 173, we use lambda expressions. (I’m unclear if lambda is an expression or not.) All the previous examples do not use lambda and many later examples do not use lambda. Might it be worthwhile to explain the reason for these examples using lamdba while others do not? | 2010-07-18 | ||
175 | SUGGEST | When reading the section named Expecting Errors, I “ignored” the fact that all the snippets involving raise_error given in the book were embedded used a lambda instead of simply using the expression being tested. Because should() and should_not() did not require the lambda to delay the evaluation of the function call, I mistakenly thought that raise_error() would not require the lambda. When I attempted to use the raise_error matcher on my own, I discovered that rspec did not “catch” the RuntimeError as part of the raise_error matcher; instead, it handled it as an error in the specification (bad words, I think). As I researched the issue, I discovered that all examples using the raise_error matcher used lambda. I eventually realized that it was required, and I slowly began to understand why rspec considered the (expected) exception that my code raised was an error (never making it to the raise_error matcher). However, since this time is the first time that the expression under test must be within a lambda, I think it would be useful to explain it - for the uninitiated. Thanks. | 2010-07-21 | ||
56 | OK | def puts(message) messages << message should be def puts(message) @messages << message Notice the missing @ sign (making it a global object) before messages | 2010-07-21 | The code is correct. The messages on line 7 references the messages method on line 2. If we added the @ sign, then the @messages instance variable might not be defined when puts gets called. | |
266 | SUGGEST | The first sentence is the key idea. Great job! (Not really a suggestion but sometimes one needs “atta boys.”) | 2010-07-21 | ||
274 | SUGGEST | In the last line of the example at the bottom of the page, we include arguments in double quotes. Do double quotes produce replaceable arguments? | 2010-07-21 | ||
276 | TYPO | The second paragraph in the Given section at the bottom of the page states: “…not bound by pre-condition contracts, and can explicitly violate….” I think the word “we” is missing before “can.” | 2010-07-21 | ||
277 | SUGGEST | In the second paragraph, after the Then expectations, we write “…while that may be a legitimate outcome….” I found this phrase through the end of the sentence confusing. | 2010-07-21 | Will be addressed in copyedit. | |
277 | SUGGEST | The third paragraph states: “..we can talk about two general approaches that offer different costs and benefits….” Do these different approaches only offer different costs and benefits or do these approaches have different purposes or goals? | 2010-07-21 | ||
278 | SUGGEST | The first paragraph states: “…more of the long term maintenance burden….” I do not understand. Is the maintenance burden maintaining the tests or maintaining the applications? If it is the burden of maintaining the tests, can we explain this idea more (since we do not talk about this maintenance burden elsewhere). | 2010-07-21 | ||
278 | SUGGEST | At the end of the second paragraph, we write: “…borne by the step definitions, in Ruby.” Does that mean that different languages have different costs? | 2010-07-21 | ||
278 | SUGGEST | In the first paragraph of the section named “Organizing Features,” we write: “…you can easily manage that with tags and profiles.” What are tags? What are profiles? We explain tags on the next page, but we do not explain profiles until the next chapter. | 2010-07-21 | ||
285 | DEFER | In the second paragraph on the page, we write: “…contains one or more ‘capture groups’….” I believe this reference is the first reference to “capture groups.” If so, can we explain them better? | 2010-07-21 | ||
285 | SUGGEST | The last paragraph contains the phrase “…below features//.rb” I’m uncertain what this unusual direcory “name” is communicating? Are we trying to communicate “any .rb file in features or any of its subdirectories”? | 2010-07-21 | ||
287 | SUGGEST | Finally, the “Joe Asks…” sidebar describes the use of double quotes to indicates step arguments! I think we need to move this sidebar, or perhaps part of the explanation, earlier in the book - perhaps as early as chapter 1. | 2010-07-21 | ||
288 | SUGGEST | The last sentence of the first paragraph ends with: “which we typically do from the Gherkin feature files.” I do not understand this phrase in the context of this paragraph. | 2010-07-21 | ||
288 | SUGGEST | The list in the middle of the page contains: “AfterStep : Executed after every step.” I cannot envision how one might actually use this feature, and I do not believe we discuss it in detail in the text. What recommendations do you have for using this feature? | 2010-07-21 | ||
288 | SUGGEST | In the third paragraph from the end of the page, we describe using multiple “Before” hooks. What is the order in which these different hooks are executed (before each scenario)? | 2010-07-21 | ||
289 | SUGGEST | The first (non-code) paragraph states: “…just like we can do on the command line with —tags.” I believe we have explained this usage earlier. If so, I believe a “back-reference” would help to remind me of those details. | 2010-07-21 | ||
294 | SUGGEST | The first paragraph in the section named “Configuration” (finally) defines profiles. On earlier references to this term, we need to add “forward references” to this section. | 2010-07-21 | ||
294 | SUGGEST | The section named “Configuration” describes profiles. Is a profile simply a shortcut for a specific set of command-line options? | 2010-07-21 | ||
295 | SUGGEST | The first sentence on the page says: “profiles to run on our CI servers.” Will all our intended readers understand the acronym CI? | 2010-07-21 | ||
88 | ERROR | At the top of the page, you have: But we are dealing with 14 scenarios, not 15… we have 11 passing, and 3 failing… unless I missed something. | 2010-07-21 | ||
79 | SUGGEST | Chapter: Adding New Features: What we’ve learned: | 2010-07-20 | ||
81 | TYPO | On the code example, the “let” lines are marked as new with a yellow triangle but they shouldn’t as they were introduced before. | 2010-07-20 | ||
81 | TYPO | Sorry, forget the previous erratum, I did not notice the “let” lines had been moved up. They’re OK. | 2010-07-20 | ||
298 | SUGGEST | This portion of the book seems to assume a fairly intimate knowledge of Rails. Since I do not have this knowledge, I found it fairly difficult to follow. Do we need to state the assumption that a knowledge of Rails is expected to read and understand the book or do we need to provide a bit more background on Rails? | 2010-07-21 | This will be stated in the preface. | |
60 | SUGGEST | While color highlighting seems to be the default for Cucumber, color isn’t the default for RSpec. Adding -c to the spec command adds useful color highlighting. spec -c spec/codebreaker/game_spec.rb —format nested | 2010-07-21 | ||
75 | TYPO | The Given /^the secret code is “([^\\”]*)" $/ do |secret| didn’t work for me either, but the suggestion to remove the quotes (#Erratum 42386) didn’t work either. Hardcoding I’m using Ruby 1.8.7 and Cucumber 0.6.4. | 2010-07-21 | ||
89 | OK | I don’t think you have introduced the last context “with 1 number match and 1 exact match (in that order)” yet. | 2010-07-21 | It's on the previous page. | |
93 | ERROR | the second line should read “if number_match?(guess, index) && !exact_match?(guess, index)” which includes the bug fix from the last chapter | 2010-07-21 | ||
236 | ERROR | On rspec2, instead of “spec specs —format specdoc”, it is “rspec spec —format documentation”, I guess you’re talking about this? | 2010-07-21 | ||
277 | TYPO | “at a higher altitude then when I started” => “then” should be “than” | 2010-07-21 | ||
287 | TYPO | “This doesn’t mean you should always use the explcit style” => “explcit” should be “explicit” | 2010-07-21 | ||
84 | SUGGEST | maybe you should say that when you modify the guess method you even have to modify “start” and add | 2010-07-21 | ||
30 | OK | The Cucumber Then step: Then /^I should see “([^\\”]*)" $/ do |greeting| makes use of RSpec’s should method. Consequently, this step will generate an error if the RSpec GEM is not installed. Anyone dipping into the book to find out about Cucumber may not recognize this subtlety. It would be helpful to mention that: Any value returned from a Cucumber step is ignored. To flag an error condition in a Cucumber step, an exception must be raised and this is what the should method does (as do other expectations). | 2010-07-21 | Section 2.1, Installation, says to install both gems. | |
34 | TYPO | A - indicates a number match: one of the numbers in the guess is the same as one of the numbers in the secret code, but in a Should Be - A - indicates a number match: one of the numbers in the guess is the same as one of the numbers in the secret code, but in a different position | 2010-07-18 | ||
90 | TYPO | Last line before section 7.4 leared -> learned | 2010-07-21 | ||
28 | TYPO | In the last sentence on the page, “community” is misspelled. | 2010-07-25 | ||
22 | TYPO | In section 1.2; end of first paragraph: There’s a space missing between “object” and “does” in the sentence “What an objectdoes is significantly more important.” | 2010-07-25 | ||
25 | TYPO | In the sidebar “Cucumber Seeds”, fiancée is misspelled (it should be an acute accent rather than a grave accent on the penultimate “e”). “Aslak dubbed it Cucumber at the suggestion of his fiancèe, Patricia Carrier, thinking it would be a short-lived working title until it was merged back into RSpec.” | 2010-07-25 | ||
42 | TYPO | Section 3.3 first paragraph, first and second sentence. The number referencing the footnote after the first sentence has a space before it: “Acceptance Test Driven Planning is one of three practices of BDD. 5” In the second sentence there is a space missing between “Driven” and “Development”: “It is an extension of Acceptance Test DrivenDevelopment, which is a formalization of the notion of Customer Tests in XP.” | 2010-07-25 | ||
52 | TYPO | Chapter heading and first sentence run together (I think). It looks like it should be “Automating Features with Cucumber” and then “In the last chapter…” Automating Features | 2010-07-25 | ||
54 | TYPO | In the last paragraph on the page, there is a missing space between “run” and “cucumber”: | 2010-07-25 | ||
59 | TYPO | section 4.3, second and third paragraphs. There is a missing space after the period that ends the first paragraph, and missing space after “fakes,”: | 2010-07-25 | ||
63 | TYPO | Not necessarily a typo, but an inconsistency. The last paragraph talks about the spec command, but then the code example uses the rspec command: "Open up a shell and cd to the codebreaker project root directory and run the game_spec.rb file with the spec command,1 like this: rspec spec/codebreaker/game_spec.rb —format doc" The spec command is referenced again on page 71 right before the last code example before section 5.4: | 2010-07-28 | ||
82 | TYPO | In section 6.3, first sentence, it says: “In this chapter we introduced Scenario Outlines in Cucumber, which allow us to express groups of similar scenarios in a readable, scannable, and DRY format.” Actually, scenario outlines were introduced in an earlier chapter (page 47). | 2010-07-28 | ||
146 | TYPO | In the last sentence of the second paragraph there is a space missing between closing square bracket of “[feature]” and next word, “so”: | 2010-07-28 | ||
30 | TYPO | After adding RSpecGreeter class to the file and re-running test rspec command misses ‘r’ - spec greeter_spec.rb | 2010-07-28 | ||
34 | TYPO | In second to last paragraph rspec command misses “r” in two places - You can type “r”spec spec and the “r”spec command will run everything inside the spec directory. | 2010-07-28 | ||
23 | OK | The Rails for Java Dev book says it’s inspired by JBehav, p 214. 1.3 RSpec | 2010-07-28 | Well, one of us has it right :) | |
30 | TYPO | Maybe should be rspec, not spec. p30: $ gem list $ spec -h ’ | 2010-07-28 | Right - I'll update the book to say 'rspec'. \n \nAlso - to use the 'spec' command (for rspec-1) with rspec-2 installed on the system, you need to specify the version: \n \nspec _1.3.0_ spec | |
391 | TYPO | In the paragraph immediately preceding the example, the word “minispec” appears as if it is supposed to be quoted, but is instead surrounded by mojibake—a sequence of gibberish accented characters, which may be due to an encoding issue. It doesn’t quite copy and paste properly from the PDF to this form, but it’s something like â˘AIJminispecâ˘A˙I (with the accents appearing over the letters, rather than separately as they are showing up on my browser). The problem occurs in both Preview and Adobe Reader. | 2010-08-16 | ||
19 | TYPO | In the first sentence of last paragraph there is a space before the reference to footnote 2. | 2010-08-16 | ||
26 | TYPO | In the first sentence of first paragraph there is a space before the reference to footnote 3. | 2010-08-16 | ||
70 | TYPO | In the last line of the page there is a missing space between ‘refactor’ and ‘in the green’: | 2010-08-16 | ||
83 | TYPO | In the first sentence of section 7.1 there is a missing space between ‘scenarios’ and ‘within a feature’: | 2010-08-16 | ||
89 | TYPO | In the first line of the page, there is a missing space between ‘of’ and ‘systems’: | 2010-08-16 | ||
101 | TYPO | In the first sentence of the second paragraph, there is a missing space between “Ruby’s” and “inject”: | 2010-08-16 | ||
104 | TYPO | In the first sentence on the page, there is an extra space before the period: | 2010-08-16 | ||
122 | TYPO | In the first sentence of the second paragraph, there is a missing space between ‘serve’ and ‘as’: | 2010-08-16 | ||
127 | TYPO | In the penultimate line of the second paragraph there are four successive periods instead of an ellipsis: | 2010-08-16 | ||
288 | ERROR | Running rake rspec yields I think this is because until I generate the first spec it doesn’t find any files to check. Problem goes away as soon as there is at least one _spec.rb file in a spec subdirectory | 2010-08-16 | ||
211 | SUGGEST | In the pre-refactored “uses the customer’s name in the header” spec you create your logger as logger = mock(“logger”) Since you aren’t setting any expectations on the logger it may be clearer to create it as a stub or double. | 2010-08-16 | ||
12 | TYPO | That last word on the page is spelled everbody. Should be everybody. | 2010-08-16 | ||
21 | OK | “Once we acknowledge this, it changes the way we think about driving out code.” The phrase “driving out code” is probably intended to be “driving our code.” | 2010-08-04 | ||
303 | TYPO | Near the bottom of the page the following sentence is repeated twice, once with a footnote and once without: Once those additions and changes are in place, re-run | 2010-08-16 | ||
203 | TYPO | Th last sentence of second paragraph seems to be missing a word: | 2010-08-16 | ||
221 | TYPO | In the second sentence of the third paragraph, there is a contraction of “it is”/“it has” (“it’s”) instead of the possessive adjective “its”: | 2010-08-16 | ||
224 | TYPO | In the last sentence of the first paragraph under the header “Run Several Specs at Once” it says: Should this be “the spec directory”? Or perhaps the command should be “rspec rspec” in order to specify the rspec directory (if the convention has changed in Rails 3)? | 2010-08-16 | The "spec" directory is correct. | |
0 | SUGGEST | There’s a bit of a mix between British and American spelling (EN-gb: “behaviour”, en-US: gray, color). Is this a deliberate decision? | 2010-08-16 | The name Behaviour Driven Development was coined by a brit, so that is the spelling we use. The rest of the book uses american spellings. Yes, deliberate. | |
143 | TYPO | In the middle of third paragraph there is a space before the reference to footnote 3: | 2010-08-16 | ||
146 | TYPO | The first sentence of the third paragraph is missing a space between ‘givens,’ and ‘events’: This same issue is also seen two sentences further along, between “given),” and “or”: | 2010-08-16 | ||
155 | TYPO | In the third paragraph, second sentence, after the output for Newspaper, there is a space missing between ‘refactor’ and ‘in the green’: | 2010-08-16 | ||
157 | TYPO | In the last sentence of the second paragraph of section 12.3 there’s a space missing between “Rspec’s” and “before()”: “Right now, let?s talk about grouping things by Initial State, using RSpec?sbefore( ) hook.” | 2010-08-16 | ||
160 | TYPO | On the last sentence of the third-from-last paragraph, there is a space missing between ‘a’ and ‘begin/ensure/end’: | 2010-08-16 | ||
338 | ERROR | The example at the top of the page, “renders a text field for the message title” uses the deprecated response.should … instead of rendered.should … The downloadable code sample contains the same error. | 2010-08-16 | ||
344 | TYPO | In the sentence “When the messsage doesn’t tell us exactly what we need to do next, however, that’s a good case for a view spec.” message is misspelled as messsage. | 2010-08-16 | ||
348 | SUGGEST | This page states that running rake spec:controllers will result in a “no route matches” error. However, if you’re continuing from the previous chapter, you’ve already done the recommended solution, adding resources :messages to the routes.rb. This results in you not receiving the error mentioned in the book. This probably isn’t a big deal though. | 2010-08-16 | ||
350 | TYPO | There are a few instances of “messsages” on this page instead of “messages”. | 2010-08-16 | ||
351 | ERROR | I think the expected error at the top of the page is incorrect. You say to expect a failure with the message: Failure/Error: Message.should_receive(:new).with(“text” => “a quick brown fox” ) but I received: Failure/Error: message.should_receive(:save) I think my failure is the one which matches the example at the top of the page. | 2010-08-16 | ||
336 | ERROR | Changing double(‘Message’) to mock_model(‘Message’) and running ‘rspec spec’ results in an error different from that, which was expected. Expected error: Actual error: It received Message | 2010-08-16 | I get "undefined method 'message_path'". Are you sure you've got Message in quotes? | |
375 | TYPO | The code snippet at the top of this page is supposed to be different from the one in the previous page. But they’re exactly the same. | 2010-08-16 | ||
363 | ERROR | After setting up the controller method and running the examples, the book says to expect an “uninitialized constant AccessDenied” error. However, I received an “uninitialized constant StubResourcesController” error. This error persisted until the ApplicationController was modified on the next page (364) to rescue from AccessDenied. | 2010-08-16 | That was an rspec issue which will be fixed in the beta 20 release | |
375 | ERROR | The MessagesController create action is exactly as in page 374, where it should have changed to tell the current user to send a message. | 2010-08-16 | ||
31 | OK | In the greeter_steps.rb sample there is a space in the regular expression: “([^” ]*)". If you create the file by means of copy and paste from the PDF, that space makes the step become undefined when you run cucumber command. | 2010-08-16 | The problem is with your PDF reader and there's nothing we can really do about it. There is no space in the text that we use to generate the book, and there is no space when I copy/paste in my PDF reader (Mac Preview). | |
229 | TYPO | Autotest.discover { “rspec2” } | 2010-08-16 | ||
114 | TYPO | the new paragraph: | 2010-08-16 | ||
286 | TYPO | In 19.2 (Setting Up a Rails 3 Project) | 2010-08-16 | ||
343 | ERROR | Just above the last code snippet, the book says: That example fails with: But the error really is: | 2010-08-16 | I get "undefined method `display_for'" | |
348 | SUGGEST | Under the section titled “Time to introduce the model” If the reader has been following along with the book since the chapter on Rails Views (i.e. View Specs), he/she will not encounter the error that says: No route matches {:message=>{“text” =>“a quick brown fox” }, because that error was already addressed in the previous chapter. I humbly suggest you notify the reader about this. First time readers who are new to RSpec & Cucumber might wonder why they’re getting a different error. :-) | 2010-08-16 | I don't see any reference to setting up routes in the views chapter. Can you point me to where that is (please open up a new erratum). Thanks! \n \n[Update] Found it, never mind. Fixed. | |
349 | TYPO | Under the section titled “Temporarily pending” “Once Once we get the redirect working, we’ll | 2010-08-16 | ||
160 | SUGGEST | The paragraph finishing up the discussion about before() and after() methods But then a chapter about around() follows. | 2010-08-16 | ||
375 | TYPO | The code example at the top of page has not changed from the previous example as inferred by the text. | 2010-08-16 | ||
334 | ERROR | After changing show.html.erb to “<%= @message.text %>” the returned error is “undefined method `text’ for nil:nilClass” instead of “You have a nil object when you didn’t expect it!” using ruby 1.8.7. | 2010-08-16 | ||
371 | ERROR | The second to the last code snippet raises `const_missing’: uninitialized constant Message::User (NameError) In the book, the ‘User’ model isn’t generated until page 375. | 2010-08-16 | ||
329 | TYPO | Second to the last paragraph. Second sentence. Near “…when an third-party…” ‘an’ should be ‘a’ :-) | 2010-08-17 | ||
336 | ERROR | Sorry, I got error #44444 because instead of typing rails new ‘messages’, I accidentally typed rails new ‘message.’ Because of this, a class or a module named ‘Message’ already exists in my application and it’s neither a String nor a subclass of ActiveModel::Naming. | 2010-08-18 | Thanks for following up. | |
378 | TYPO | The last code block adds a second test which immediately passes because we had already added the message attributes to the first test. Would it perhaps be better to add the second test as a failing test as soon as we identify the need for the message attributes, get that test passing and then return and get the first test to pass? | 2010-08-18 | I think your suggestion is a perfectly valid approach, but as neither of these examples leads us to add the attributes to the model (we defined them as requirements earlier in the chapter), it's really a judgement call. | |
393 | TYPO | Section A.3 Guards, paragraph 4, line 2: “after a particular version of MRI has been release,” should end “has been RELEASED”. (Add the ‘D’ to the end of release.) | 2010-08-17 | ||
348 | OK | After generating the Message model and migrating the development db | 2010-09-04 | You shouldn't have to if you're running rake, which is what is used on that page (and throughout that section). | |
370 | OK | Why not using let(:message) instead of setting an | 2010-09-04 | It's done both ways in different parts of the book. Both styles work, are supported, valid and people use them out in the wild. | |
333 | DEFER | While i understand that the structure and organization of There are no failing scenarios here that are leading to the code examples
I assume you have good reasons for leaving out cucumber here, but Maybe it would be possible to maintain the bdd-cycle-outside-in style without destroying | 2010-09-04 | ||
81 | OK | Regular expression in step definitions are missing one backslash: | 2010-09-04 | It's not actually necessary so cucumber doesn't generate. | |
401 | TYPO | “actual < (expected + delta) or > (expected - delta)” is always true. Did you mean “and” instead? | 2010-09-04 | ||
35 | DEFER | The description of codebreaker doesn’t state that a number can only occur once. Perhaps a good example of specifications not being complete when you start a project? | 2010-09-04 | ||
91 | SUGGEST | At risk of engaging in TMTOWTDI, couldn’t you use 0…(guess.length).each rather than use a magic number? | 2010-09-04 | ||
106 | OK | Do you mean “Don’t forget to remove it from the Game file.” rather than “Don’t forget to remove it from the Game class.”? | 2010-09-04 | Nope, though the result is the same. | |
119 | OK | String#map doesn’t work in ruby 1.9. It tells you that you didn’t specify what you were iterating by. | 2010-09-04 | The book explicitly states that the examples work in 1.8 and might work in 1.9. | |
352 | OK | Running “rake spec:controllers” after updating messages_controller_spec.rb to the code shown in the “Tidy Up” section gives this error for the third example: 1) MessagesController POST create redirects to the Messages index I’ve copied your code directly from the source, as well as tried running the rake task directly within the code folder—all give the same error. Changing the second line of the “redirects to the Messages index” to only “response.should” brings me back to green, but obviously this isn’t the test we want. | 2010-09-04 | That was the case with earlier beta versions of rspec and rails, but not with the versions cited in the book: rails-3.0.0.rc and rspec-rails-2.0.0.beta.19. Also works as prescribed with rails 3.0.0 (final) and rspec-rails-2.0.0.beta.20. | |
341 | OK | Shouldn’t mock_model(User, …) be rather mock_model(“User”, …)? Occurs twice on page 341. | 2010-09-04 | Not necessarily - either works. | |
192 | OK | Line 2 of the code snippet should be “include RSpec::Mocks”, shouldn’t it? | 2010-09-04 | Nope. That's included implicitly. | |
379 | OK | “Also, the messages table doesn’t have a sender_id field so be sure to make a migration which adds it.” And, again on p. 382: “We need a Subscription model and a migration that generates the subscriptions table and a subscription_id on the users table. Go ahead and add all that…” You’ve given, except for a couple of instances in the first chapter dedicated to Rails, all the low-level code and commands users who are new to Rails need to follow along with the text. I even recall a couple of comments plainly acknowledging that some of your readers may be just plain ol’ Rubyists. I have no problem with the above statements myself, but in this context, they’re just downright lazy… | 2010-09-04 | ||
287 | TYPO | The first line appears to be mis-worded: | 2010-09-04 | ||
333 | OK | In the code example (rails_views/messages/01/spec/views/messages/show.html.erb_spec.rb) it reads: rendered.should contain(“Hello world!”) when it should read: response.should contain(“Hello world!”) | 2010-09-04 | rendered is correct for rspec-2/rails-3 | |
99 | TYPO | In the sentence: The last line of the guess method didn’t change, but it’s reference to it’s should be its | 2010-09-12 | ||
298 | OK | Webrat isn’t compatible with Rails3 (last time I checked about a week ago) Do you have any plans to replace Webrat refs with Capybara?? Might be confusing to people if the final version of this book is released and there’s still no rails3 compatible version. | 2010-09-08 | Webrat is compatible with rails 3 (and has been since the 0.7.2.beta.1 release about a month ago). If you are having specific issues, please contact the rspec-users mailing list. | |
199 | TYPO | Code is using #stub! where it should be using #stub tp be consistent with other method calls. | 2010-09-12 | ||
343 | ERROR | Note: this is already logged as a bug (I guess we can’t comment on existing bugs???) but David says he gets “undefined method: display_for” as the book describes. I think it IS correctly logged as an error as, in the previous step you define the method display_for in the helper, thus, the REAL error should be that the content should be nil, but isn’t | 2010-09-12 | Yeah - I wish this could be more of a conversation tool. \n \nAnyhow, the "previous step" is not really a previous step :) It's just an explanation of an API that we'd like to expose, but it's not really written anywhere in any code until after we have the failing example. The "undefined method" error is, therefore, the correct error at that point. Does that make sense? | |
149 | SUGGEST | The RSpec book should include a section on how to create scriptlets. An RSpec scriptlet is a piece of reusable example that can be invoked from multiple test scripts. The way I do it is to include a file under my project’s lib directory. module YourProject # The following makes use of the Ruby Module#included hook pattern Then in my test script, it “will do the rest” do | 2010-09-12 | RSpec already has shared example groups. | |
391 | TYPO | In the code for minispec, the first class name is PostiveSpec. Shouldn’t it be PositiveSpec? | 2010-09-12 | ||
333 | ERROR | The Gemfile example on this page only shows including “rspec-rails” , but the contain() method called later is from webrat. The example on this page wouldn’t run until I also included “webrat” in my Gemfile. | 2010-09-12 | ||
338 | ERROR | The example at the bottom of this page gives me the following failure: Failures: | 2010-09-12 | ||
72 | OK | undefined method `let’ (Ubuntu x64 10.04, rspec v2.0.0.beta.20, ruby v1.9.2p0 via rvm) Testing goes well till cb/14/spec/codebreaker/game_spec.rb (with instance variables); but in cb/15/spec/codebreaker/game_spec.rb I have this error: 2) Codebreaker::Game #start prompts for the first guess Anyway… wonderful book! | 2010-09-12 | That error suggests that you're trying to use let in an example rather than in an example group. If that's not the case, please report this to http://github.com/rspec/rspec-core/issues. \n \nThx | |
191 | TYPO | “Method stubs and messsage expectations…” “messsage” with three s | 2010-09-12 | ||
199 | TYPO | In the “Partial Mocking” example, stub methods are used, but not mock methods (as I suppose it should be, considering the title of the paragraph) | 2010-09-12 | It's got both. should_receive is the method used for mocking. | |
26 | TYPO | In the third paragraph, there is an extra space before the second sentence which I would have thought would have been handled by the paragraph formatting code. You might have a non-breaking space or something like that where you did not intend to have one. | 2010-10-11 | ||
59 | ERROR | When I run “cucumber features/codebreaker_starts_game.feature” prior to adding the definition for initialize to the Game class, I do not get the message, “wrong number of arguments (1 for 0) (ArgumentError)”. In fact, that step passes. If I add the code: def initialize to the Game class, I do get the wrong number of arguments error. I have not been able to track down the problem yet. I am running cucumber 0.8.5 with ruby 1.9.2 p0 on FreeBSD 7.3. | 2010-10-14 | The code examples are all run against 1.8.7 (this is stated at the beginning of the book). What you've found is an interesting quirk of ruby-1.9.2 - http://gist.github.com/626494. I'm not sure if it's a feature or bug, but it sure is surprising. | |
81 | TYPO | In the last paragraph, first sentence, you say that we will remove the default value in the next chapter. We have already removed the default value on page 79. The code listing cb/18/lib/codebreaker/game.rb reflects the removed default value. | 2010-10-14 | ||
84 | TYPO | In the listing for game_spec.rb, you have triangles in the left margin for the two let statements. These lines are unchanged from what we did back on page 72 as is shown in cb/15/spec/codebreaker/game_spec.rb. | 2010-09-16 | ||
84 | SUGGEST | Please ignore errata #45064. I didn’t notice that the let lines moved up a block. Sorry for the noise. | 2010-09-16 | ||
118 | SUGGEST | In the code listing for marker_spec.rb, you might want to place a triangle in the left margin of the pending statement to draw attention to it. | 2010-10-14 | ||
81 | ERROR | Using rspec 2.0.0.beta.22 and cucumber 0.8.5 and ruby 1.9.2 via rvm The code in the block headed by: Then /^the mark should be “([^”]*)"$/ do |mark| However the suggested steps listed by cucumber are along the lines of: Then /^the mark should be \\\\\\+$/ do The step listed in the book is not matched by cucumber and does not work. | 2010-10-14 | What's in the book is correct. Not sure why you're seeing different output from cucumber, but that's what I see, and it does work as advertised. \n | |
329 | TYPO | first paragraph: while debugging failures could be reworded, eg. “while debugging fails.” | 2010-10-11 | ||
312 | TYPO | In the code for cucumber_rails/01/features/showtime_descriptions.feature, the first scenario is tagged with | 2010-10-16 | ||
312 | TYPO | “Go ahead and run script/cucumber —tag @focus from the project root” should be —tags instead of —tag. | 2010-10-16 | ||
62 | TYPO | It says: | 2010-10-14 | ||
62 | TYPO | “rspec spec/codebreaker/game_spec.rb —format doc” This command omits ‘—color’ switch but output is shown with color in PDF version. | 2010-10-11 | ||
83 | TYPO | First paragraph in section 7.1 - missing space in the second line after word ‘scenarios’. | 2010-10-11 | ||
59 | ERROR | After adding the Output class definition to codebreaker_steps.rb we are instructed to run the cucumber command again and should see an ArgumentError. However, the example code as currently written will return a NameError (undefined local variable or method ‘output’ for #
… | 2010-10-11 | ||
59 | SUGGEST | Please ignore my last submission regarding the output method. I failed to see that it was implemented as a global method, outside of the Output class definition. My bad! | 2010-10-11 | ||
99 | TYPO | “The last line of the guess method didn’t change, but it’s reference to exact_match_count now points to the method instead of a local, temp variable.” - there should not be an apostrophe in “its” ! Also, it is rather confusing that the last line of the exact_match_count method returns an identically-named variable, especially if the reader isn’t familiar with Ruby’s mechanism for resolving this type of ambiguity. When I initially scan-read this sentence, I mistakenly thought it was talking about the last line of the exact_match_count, and ended up thinking “huh? the method is returning a reference to itself rather than to the count variable?” Obviously this can be avoided by Rename Variable, which you already do implicitly when introducing use of inject later on. One solution would be to do this Rename Variable earlier, at the same time as the two Extract Methods, although that probably violates some rule about only doing one refactoring at a time … but if so, you are arguably already violating that when you do it at the same time as introducing inject :-p | 2010-10-14 | ||
80 | ERROR | Given /^the secret code is “([^”]*)"$/ do |secret| should be: When /^I guess “([^”]*)"$/ do |guess| I am guessing at that stage we are still working on “I guess …” scenario. | 2010-10-11 | ||
80 | ERROR | There is no error as previously reported. The book is correct. | 2010-10-11 | ||
172 | TYPO | “Ruby is bit more complicated” should say “Ruby is a bit more complicated” | 2010-10-14 | ||
21 | TYPO | “Whether we’re talking an object” in the section “It’s All Behavior”. I feel there should be a pause or a word after talking: (i.e. talking about an object). | 2010-10-14 | ||
28 | SUGGEST | This is the “given” in this example (the “when”, the “then”). These words are not set in italics in the Mobi version as they are in the PDF. | 2010-10-14 | ||
30 | SUGGEST | The part about “move the greeter_spec.rb file” confused me. The step definition on the next page uses CucumberGreeter.new, which I immediately thought was an error, and should have been RSpecGreeter.rb. Since these examples don’t share code, I would treat them as separate, and not put them together at least until page 33 where it currently says “If you moved…” | 2010-10-14 | ||
287 | TYPO | In the first line on the page, “that they’re code is available” should be “that their code is available”. | 2010-10-14 | ||
206 | TYPO | … to express more specfic constraints. should be … to express more specific constraints. | 2010-11-07 | ||
206 | TYPO | … we can express this expectation something like this: should be … we can express this expectation like this: | 2010-11-07 | ||
207 | SUGGEST | Now, the message will be: Given the message just above, it would be more consistent to use: Mock ‘calculator’ expected :add with (a number greater than 3) | 2010-11-07 | ||
209 | TYPO | The @network in each of these variations behave … should be The @network in each of these variations behaves … | 2010-11-06 | ||
32 | TYPO | On this line: Then /^I should see “([^” ]*)"$/ do |greeting| there is a space between the ‘"’ and the ‘]’. | 2010-11-06 | ||
332 | TYPO | The first sentence of the second paragraph should change. Current form: “We use views to display data provided by models which are, in turn provided by controllers.” Either ditch the comma, or add another one right after “in turn” to balance it. I would encourage ditching it to promote sentence flow; the role of controllers in the sentence isn’t fundamental enough to justify the gravity of those commas. | 2010-11-06 | ||
425 | TYPO | The links to the RSpec book and the PragProg catalog on this page do not work in Preview on OSX. The other links that are prefixed with the h-t-t-p I had to spell out the protocol like that because when I tried to just put it in, the error message I got (in green) said hyperlinks weren’t allowed. | 2010-11-07 | ||
34 | TYPO | Different output when we run cucumber features. | 2010-11-07 | ||
31/32 | TYPO | Output fom the example run appears to be duplicated | 2010-11-07 | ||
34 | TYPO | The example results following the successful test are copied from the failed test results on the previous page (p33). | 2010-11-07 | ||
196 | SUGGEST | section: Mixing Method Stubs and Message Expectations The code example above doesn’t use mock() or stub() to generate a double. Maybe it’s implied but since I’m just learning I’m not sure. | 2010-11-07 | ||
176 | TYPO | Under the Ch, ch, ch, ch, changes heading. There is a typo. It should say “Ruby on Rails” instead it says “Ruby on RailsRuby on Rails” | 2010-11-07 | ||
389 | ERROR | PDF table-of-contents: the appendices seem to be mis-nested. | 2010-11-07 | ||
170 | DEFER | I think “nontechnical” should be hyphenated: “non-technical” | |||
167 | DEFER | There’s a missing space after the comma: “It /is/ DRY,/and/ it’s so complicated.” | |||
297 | ERROR | the first output of the “completing the feature” section is not correct, it should show that there is an error, as the step it’s not passing because the minutes are showed!!! | 2010-11-27 | ||
59 | DEFER | 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…”. | |||
93 | TYPO | Under Learning from Rapid Feedback: “Both failures are because of one or more minus sign than…” should be “Both failures are because of one or more minus signs than…” | 2010-11-27 | ||
288 | ERROR | Instead of: | 2010-11-27 | ||
22 | DEFER | 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 somewhere and they can get it back.” | |||
176 | DEFER | Ruby on RailsRuby on Rails extends … | |||
176 | SUGGEST | For the real estate examples under the Ch, ch, ch, ch, changes heading, the use of underscores in the sale and commission numbers is confusing. | 2010-11-27 | ||
200 | ERROR | The first example does not actually call Widget.find, so the expectation that the Widget class should receive the find() message will never be met. | 2010-11-27 | It's called by the put action, not in the example itself. | |
200 | DEFER | “The first example specifies that the WidgetsController finds the widget, so we set an expectation that the Widget class should receive the find() method.” This should be “find() message” rather than “find() method” because messages are received, not methods. | |||
106 | DEFER | “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 it means simply “Create a marker.rb file in lib/codebreaker and move the Marker class into that file.” With no module around it? That works, but I’m not sure it’s just what was meant. It’s a Ruby-newbie issue but it might be worth trying to clarify a bit. | |||
183 | DEFER | There should be no comma in “When it receives a message, it does not understand” on line 2. | |||
193 | DEFER | “All of the other patterns we’ll talk about and you’ll read about elsewhere are usually variations of method stubs and method expectations…” Does this means that every other pattern is usually (but not always) a variation, or the nearly every (but not all) patterns are variations? There is a difference in meaning. | |||
196 | TYPO | By using the mock( ) method to generate the logger double and the stub( ) method to generate the customer double,… As previously pointed out, this is confusing since “mock()” does not occur in the example. Given several uses of the word “mock,” it would be helpful to remind us again that here it means a message expectation, expressed by the “should_receive.” At least, I think so! | 2010-11-29 | ||
232 | DEFER | RSpec::Core::RakeTask.new do |t| spec_opts takes an array of strings,… Should “spec_opts” be “rspec_opts”? | |||
238 | DEFER | 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 so we can run the [sic] rest of the suite…” | |||
367 | DEFER | The database migration on this page specifies “recipient_id”: “script/rails generate model message title:string text:text recipient_id:integer” On PDF page 371 and 372, the reference is to “recipient” (no “_id”). Admittedly I’m a beginner in Ruby but for me this example fails. For context, I’m running Rails 3.0.3 and Ruby 1.9.2p0. | |||
300 | DEFER | “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 practice.” Awkward sentence with “for in practice.” Consider rewording at least to “that in practice we use RSpec for,” if not the more formal “for which in practice we use RSpec.” | |||
101 | OK | Next step! line looks like it should be a section header, but is formatted like normal text. | 2011-04-05 | It is not a section header. | |
130 | DEFER | The claim that exponential cost increase in later bug fixes comes from civil engineering would be nice to have footnoted with a source | |||
251 | ERROR | 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. | |||
273 | TYPO | 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 # given above corresponds to Kindle location. | |||
43 | DEFER | 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 page 52 reads: We picked out two stories that will result in working software sufficient to interact with it in a meaningful way. Poor third story… | |||
67 | DEFER | 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 keyword; in “Codebreaker::Game#start”, the # is treated as the start of a comment. This could be overlooked were it not for the explicit instruction to “use the —color flag”. | |||
102 | TYPO | Missing space between “Ruby’s” and “inject” in the second paragraph. | 2011-04-05 | ||
34 | DEFER | The phrase “go ahead and | |||
113 | OK | depot>rails generate scaffold Product\\title:string … hi, i’m a noob, but for me the backslash after Product did’nt work, i used “/” | 2011-04-05 | p 113 is in the first part of the book. Please re-report with the correct page number. | |
232 | ERROR | The example Rakefile for RCov doesn’t seem to be valid for RSpec 2.0 (as is used in the book so far), but rather for the older version 1.3: require ‘rake’ The solution for me, as found through a Google search, was to replace t.spec_files = FileList[‘spec//*_spec.rb’] with.. t.pattern = ‘spec//*_spec.rb’ Regards, | 2011-04-05 | ||
338 | DEFER | 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.html.erb_spec.rb on pdf page 338 results in a an unintended failure: Failures: | |||
186 | TYPO | Last sentence of first paragraph ends: should be greater than or equal to 980 and less than or equal to 1,f020.” The very last word “1,f020” shouldn’t have an “f” in the middle of it. | 2011-04-05 | ||
270 | TYPO | “Create a step_definitions subdirectory in features, and add a file named hotel_steps.rb.” However, the code snippet that follows gives a path of “cucumber/02/features/step_definitions/room_steps.rb” hotel_steps.rb != room_steps.rb | 2011-04-05 | ||
296 | TYPO | The first time cucumber is run under “Completing the Feature” I would think that only 1 of 2 scenarios should pass. The second one “2pm” vs “2:00pm” should fail. The text suggests that is what happens as the next task is fixing the showtime method. | 2011-04-05 | ||
97 | OK | “We’ll clean this up during our refactoring this chapter.” should be “We’ll clean this up during our refactoring this in chapter.” | 2011-04-05 | ||
102 | TYPO | “using Ruby’sinject iterator in each” has no space between “Ruby’s” and “inject”. | 2011-04-05 | ||
43 | OK | The change to code_breaker_steps.rb to pass the Output test double into the constructor is incorrectly referencing the output variable (output vs. @output) Should be: When /^I start a new game$/ do instead of When /^I start a new game$/ do | 2011-04-05 | It's referencing the output method, not a variable. Look at the bottom of the first listing on the same page. | |
249 | TYPO | The reference for formatter method “dump_summary” doesn’t match the rest of the reference entries, because it is preceded by the keyword “def”. This also results in awkward wrapping on an already long method declaration. | 2011-04-05 | ||
295 | TYPO | “The model generator creates a movie_spec.rb because RSpec registered itself as the test framework when we ran script/rails generate rspec:install.” This is true of rails 3, but not rails 2, where it does not create the file. | 2011-04-05 | Correct. The book covers Rails 3. | |
127 | OK | “at this stage … by this stage” | 2011-04-05 | That's intentional. Read it again. It's funny, even though Dan wrote it. | |
92 | OK | By the time I got the the second paragraph on page 92, I had 11 passing, not 12. I checked everything a couple of times, but could not see anything wrong and so I continued. By the time I completed the following steps through page 94, everything was passing. | 2011-04-05 | I just went through it again and I see 12 passing. Do you have a total of 15 scenarios? If not, be sure to check the feature against the listing on pp77/78 | |
1 | DEFER |
My rating: 10/10. That said, I have a few thoughts… ## On brute-forcing ## On testing ## On workflow ## On autotesting ## On mocks ## On milestones ## On Cucumber ## On Rails BDD Suggest something like “def and; self; end” to rspec authors, allowing: I don’t like script/rails at all, who does that? Also, seems like —no-helper is no longer valid. Migrations: I feel something missing here. The shoulda people will feel a little offended, not a single “is valid with valid attributes” <- pointless? This is not behavior. On associations, agree you shouldn’t spec them directly. ## On Progressive Enhancement (or the lack of) ## Colophon Nevertheless, a terrific work, a must-have book, and an amazing source of Thanks NaN ;) On Cucumber part, there are still examples which use b/w instead of +/-. | |||
120 | OK | I received undefined method `map’ for 1234 instead of undefined method `delete_at’ for 1234 | 2011-04-05 | The examples in the book work as described with ruby-1.8.7. If you run it w/ 1.9.2 you'll get the error you mentioned. | |
167 | TYPO | Missing space after the comma in “It is DRY, and it’s so complicated.” | 2011-04-05 | ||
230 | DEFER | 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 for a while, it was also not listed on page 18. Please consider adding the appropriate gem to page 18 or mentioning where to find it on page 230. | |||
61 | OK | “start game” scenario wont fail in ruby 1.9.2 because of strange ruby behavior:
ruby-1.9.2-p0 > class O; end
irb(main):001:0> class O; end | 2011-04-05 | The examples in the book were written to work with ruby 1.8.7, so the book is fine here (though if we get to a 2nd edition we'll update to 1.9.2). \n \nYes, that is odd behavior, and it's due to an unfortunate change to ruby 1.9.2 that I believe (hope) is being reversed for 1.9.3. | |
73 | DEFER | 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 would make sure the numbers always progress in sequence. | |||
296 | OK | I cannot seem to get both scenarios to run by simply removing :wip from the rake command. I have to remove the tag from the feature file. I am using the same version of cucumber-rails as the example. It seems counter to what I read before about tags. | 2011-04-05 | Probably your cucumber.yml file has an exclusion of wip tags in the default profile. | |
59 | OK | The path in the code: Should not it be | 2011-04-05 | $LOAD_PATH << File.expand_path('../../../lib', _FILE_) is correct. \n \nThe __FILE__ argument provides the starting point. The first ../ gets you to the same directory as the file: support. The 2nd ../ gets you to the features dir. The 3rd ../ gets you to the project root dir, below which lies the lib dir. | |
287 | DEFER | The autotest/discover.rb would not be any more generated since this commit f47e87b39a6f2bc24b71d701c8b509fd6e32acb1 in the rspec-rails repository. | |||
238 | OK | It says you can require ‘ping’ to do a ping in your ruby code. This used to work under ruby 1.8.7, but having recently upgraded to ruby 1.9.2 this require no longer works. It seems that ping has been removed from the ruby 1.9.2 library. | 2011-04-05 | Per the Ruby and Gem Versions section of the Preface, the examples all work with Ruby 1.8.7. I'll change the footnote text to say "Most of the examples" instead of "The examples all ..." in the next printing. | |
304 | SUGGEST | The instructions are to run “rake features” instead of “rake cucumber” as previously done. This results in a deprecation message that tells me to run “rake -T cucumber”. This is an extremely minor point, but I had not seen “rake features” before, and it seems “rake cucumber” would be the better choice. | 2011-04-05 | ||
34 | OK | the output of cucumber features should be successful, but you have the same failing output as used on page 33 | 2011-04-05 | I can't find what you're referring to on pages 33/34 of the PDF or printed book. | |
324 | SUGGEST | The line for installing the database_cleaner plugin should have a note that the syntax has changed in rails 3. script/plugin install (Rails 2) | 2011-04-05 | ||
326 | TYPO | The “When” condition at the bottom of the page is missing its “do”. | 2011-04-05 | ||
344 | DEFER | “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 Chapter 21, where they are actually talked about and used. | |||
376 | TYPO | Just above the second code example of the page there’s a space missing: | 2011-04-05 | ||
152 | DEFER | Your code snippet formatter has decided that the text following => is ruby code and highlighted “require” and “and” inappropriately in the second line: describe User, “should require password length between 5 and 40” { … } | |||
260 | TYPO | The reader is asked to a create a file named features/booking.feature but the code download and the cucumber output comments on the following page uses a file called book_room.feature. It looks like running cucumber on file features/booking.feature creates a file called book_room.feature, which of course is not the case. | 2011-04-05 | ||
196 | ERROR | “To explain what we mean, let’s look at an example that uses | 2011-04-05 | ||
239 | ERROR | missing space before “:flexmock” :) | 2011-04-05 | ||
85 | DEFER | Recommend Enumerable#count, not enumerable#inject. The #count method does exactly what’s required here. Using #inject makes the code harder to read to save a temporary variable. Using #count still gets rid of the temporary variable, and improves readability to boot. | |||
350 | OK | Here, it says that we’ll have two passing examples, but the “redirects to the Messages index” will fail with the error : | 2011-04-05 | Per page 347, you should have a messages table by then. | |
120 | DEFER | 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 it in a future print run | |||
272 | OK | I get Lexing error on line 2 when I use the syntax with steps %Q{} Maybe my fault, dunno. | 2011-04-05 | It works for me as specified. It's just Ruby. Please report that to the cucumber issue tracker if you're still having trouble with it. | |
293 | OK | My installation of Cucumber didn’t work until I did it like its Github page specifies including dependencies like Capybara and Database Cleaner. group :development, :test do Otherwise I get non initialized errors for both constants Copybara and DatabaseCleaner. | 2011-04-05 | If you use the versions in the book everything work just fine. | |
59 | OK | My codebreaker.rb only works with | 2011-04-05 | That would suggest that your file/directory layout is not the same as described in earlier pages. What's there works correctly if the steps are followed, so I'm going to close this. If you want some help debugging your environment, please write to the rspec-users mailing list. | |
361 | ERROR | The render_teplate variant with template extension ‘js’ is not supported by rspec for rails 3. | 2011-04-05 | ||
67 | ERROR | In the 2nd to last paragraph, you say “Sometimes failures are logical failures, and sometimes they’re errors. In this case, we have an error.”. It seems to me that this is a logical failure - our expectation was not met. I would expect that an error would be a ruby error like referencing a method that doesn’t exist. If this is really an error, could you explain what you mean by that? | 2011-04-05 | ||
191 | ERROR | In the logger example, if the customer fails … should read In the logger example, if the statement fails … | 2011-04-05 | ||
291 | ERROR | The first instance of the cucumber output on the page should not show both scenarios passing. Otherwise there would be no reason to change the code of formatted_time. | 2011-04-05 | ||
181 | DEFER | In “/… for Aslak/”, the word for should not be printed like a keyword. This occurs on pages 181, 184 and 200(4). | |||
200 | OK | Use the pattern for the customer double as well. In before block: @customer = double(‘customer’, :name => ‘Aslak’) This may require that the subsequent explanation gets adapted. | 2011-04-05 | 'Aslak' is used on the next line as part of the expected argument to log(). Putting that in the before block means you have to look to the before to understand what's going on in the example. It's subtle, and under many circumstances I'd do what you suggest, but in this case I'm going to leave it as/is. | |
203 | SUGGEST | … and just haven’t gotten to it yet. should read … and the team just hasn’t gotten to it yet. | 2011-04-05 | ||
206 | OK | … earlier this chapter. should read … earlier in this chapter. | 2011-04-05 | ||
280 | DEFER | In “:require”, the word require should not be printed like a keyword. | |||
313 | DEFER | In “/… logged in as …/”, the word in should not be printed like a keyword. | |||
313 | TYPO | Every once in awhile, … should read Every once in a while, … | 2011-04-05 | ||
262 | ERROR | the file name of the snippet is named “hotel_steps.rb” but the example file is named “room_steps.rb” | 2011-04-05 | ||
280 | ERROR | in order to get the example running in rails 3.0.5 add | 2011-04-05 | ||
31 | TYPO | checking | |||
59 | SUGGEST | 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 does not occur at the end of the line in the epub version and looks like it is part of the file name (code-breaker.rb) Cucumber will load features/support/env.rb, which now requires lib/code- breaker.rb, which, in turn, requires lib/codebreaker/game.rb, which is | |||
75 | TYPO | “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.rb, which is missing upto this point. Feel free to reach me at khan [dot] mohammad [at] acm [dot] org, if you need further clarification. | |||
169 | TYPO | Third paragraph: have_ and has_ should be switched. It SHOULD read: | |||
221 | SUGGEST | 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 those using rails. | |||
347 | TYPO | Example rails_controllers/messages/13/spec/controllers/messages_controller_spec.rb is missing the line Message.stub(:new).and_return(message). This winds up being fixed in following examples due to the refactoring in the “Tidy Up” section. | |||
348 | TYPO | In the example rails_controllers/messages/15/spec/controllers/messages_controller_spec.rb the before block needs job.stub(:save).and_return(true) to make the “saves the message” test pass. | |||
288 | ERROR | Cucumber on rails 3 requires database_cleaner to be added explicitly to the gemfile. Following the steps here gives an error that database_cleaner is uninitialized. | |||
73 | SUGGEST | I suggest that the definition of the let() method to be updated/verified. let( i’m beginning to have a suspicion that the “name” which you feed into a call to let() is to be defined as “the name of the resource which the contents of the block are to be assigned to. For example, the generated of a mocked resource object that is to be used throughout a spec”. | |||
326 | TYPO | “The Webrat’s default timeout” should probably drop the “the”, agree? | |||
42 | TYPO | The code example is shown as Then /^I should see “([^”]*)"$/ do … but in the following paragraph, the regex is shown The presence or absences of the backslash does not make The downloadable code examples do not have the backslash. | |||
102 | SUGGEST | It’s being picky, but following the mantra that readability is paramount, isn’t this rather cryptic? count + (number_match?(guess, index) ? 1 : 0) I’d write this instead: count += 1 if number_match?(guess, index) Or I’m just not a fan of the ternary operator ;) | |||
225 | ERROR | 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” | |||
92 | TYPO | “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 | |||
47 | TYPO | 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 previous page. | |||
0 | TYPO | After location 62 on Kindle, there are some doubled hyphens, which are probably meant to be en-dashes: “Test—Driven”. | |||
274 | TYPO | At the beginning of the last sentence of the fifth paragraph (immediately before the “Tagged Hooks” subsection): “When we do,…” is somewhat confusing. Perhaps something like, “We can use a tagged hook if we don’t want that hook to run for all scenarios.” would be clearer. | |||
270 | TYPO | s/pending/undefined/ “Several things changed when we added the step definition. First, the scenario and step are no longer pending, but passing.” The scenario and step were previously undefined rather than pending. If we had run the cucumber command after pasting the cucumber-provided snippet but before editing it, then they would have temporarily been pending. | |||
353 | ERROR | In this section, the messages_controller is altered so that it stores a notice in flash when the message is successfully saved. In the examples, the #save method has not been stubbed, so we’re relying on the behavior of Mock#as_null_object to return a truthy response. In rspec-rails 2.8.1, there is a bug which causes as_null_object to return nil instead (GitHub rspec-rails issue 488). The bug was fixed in commit 7fa15c4157, but has yet to be released. So when you run rspec, the test fails. I checked the book errata and this wasn’t mentioned it, and googling eventually let me to the bug and its fix on GitHub. I thought I’d mention it so that you can list it on the errata page while a fixed release is pending. Thanks! Relevant text: Download rails_controllers/messages/17/app/controllers/messages_controller.rb def create Run that, and you’ll see that it passes. Now we have two passing exam- | |||
203 | TYPO | “Article.stub_chain” should be “article.stub_chain” | |||
94 | SUGGEST | Chapter 7.3 is all about “Refactor to Express Intent”. A minor improvement could be made to the refactored `number_match?` method to better convey the intent of the code. I suggest changing: def number_match?(guess, index) …to… def number_match?(guess, index) While the “a && !b” expression makes sense to programmers familiar with C-style syntax, I would argue that “unless” is not only more appropriate for Ruby, but does a superior job of conveying the intent of the method. | |||
88 | TYPO | missing change mark before: def initialize(secret, guess) | |||
100 | SUGGEST | 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 Marker do … end” when that is not true. | |||
353 | TYPO | First paragraph reads: “The most obvious bit is the duplication in the past two examples” “past” should be “last” | |||
103 | ERROR | @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 | |||
287 | ERROR | In 19.2 “Setting up a Rails 3 Project”, running ‘bundle install’ gives the following error: % rails generate rspec:install This appears to be a change introduced about 6 months ago (see blog post here): See github.com/cucumber/cucumber-rails/pull/171 (can’t provide a proper URL because of the submission filter). Setting up a separate group with :test only and moving ‘gem “cucumber-rails”’ into this group gets past this issue. e.g. group :test do | |||
118 | SUGGEST | You do realize that this new implementation could have been achieved by just reversing the order of the checking like this: | |||
80 | TYPO | 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 back to output.should_receive | |||
60 | ERROR | The code in step definition Then /^I should see “([^”]*)"$/ do |message| is using should method. When I followed the book using Ruby 1.9.3-p125 I was running into an error: undefined method `should’ for # Only when I included RSpec it could use all the ‘should’ methods. I included RSpec using a Gemfile, but as the book does not say anything about Gemfile, maybe including RSpec in a different way would work as well. | |||
60 | ERROR | The need for including RSpec appeared only when I used Guard for automating running Cucumber acceptance tests. When running Cucumber manually it all works fine. I’m sorry for the confusion, but in case someone else is using Guard it might be useful. I will also look into Guard to see why it runs Cucumber differently in that case than when Cucumber is run manually. | |||
150 | ERROR | `yield Thing.new do; end` binds the block to `yield` instead of `Thing.new`. Need to use `yield Thing.new { … }` instead. | |||
253 | TYPO | In the footnote, the URL to the Cucumber wiki is wrong. Cucumber has moved to another Github repository. | |||
232 | TYPO | “spec_opts takes an array of strings” (first sentence right under the “About Code Coverage” sidebar) but the (non-deprecated) option’s name is actually “rspec_opts”. | |||
238 | ERROR | network.rb | |||
91 | SUGGEST | I am using The example code fails in This version of cucumber with the error shown below. The error can be resolved by removing the “#” from the #START_HIGHLIGHT & #END_HIGHLIGHT in the Feature section. The cucumber error message is: ’ | |||
296 | ERROR | Content of simulated_browser\\05\\app\\models\\genre.rb I downloaded from the website should be: class Genre < ActiveRecord::Base Rather than: class Genre < ActiveRecord::Base The missing line causes the When step and the scenario to fail. | |||
61 | ERROR | [Using ruby 1.9.3-p194] After modifying the line game = Codebreaker::Game.new(output) and running Cucumber the book indicates that the test will fail due to the incorrect number of arguments. However, it actually first fails because the variable output is undefined. The error message is: NameError: undefined local variable or method `output’ for # adding the line output = Output.new (shown below) initializes output so that the call to Codebreaker::Game.new can occur — at which time it will fail in accordance with the book’s text. The step definition change described above is shown here: When /^I start a new game$/ do | |||
78 | ERROR | [Ruby 1.9.3p194; Cucumber 1.2.1; RSpec 2.11.0] The code for all Scenarios: below the Scenario outline should be changed Examples: For example: Scenarios: no matches Becomes.. Examples: no matches | |||
81 | ERROR | The book states that running the codebreaker_starts_game will fail because of the missing argument… however, it does not fail since a default is provided in the start method of Game. That is (in the game.rb file): def start(secret=nil) If one removes the default (=nil) from the start arguments it will fail as the book indicates. | |||
232 | TYPO | Under the “Matcher Protocol” subsubsection of subsection 16.7, under the “matches?” list item, the second sentence contains a typo: “Return true for a passing expection or false for a failure.” (should be “expectation” not “expection”) | |||
278 | ERROR | 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. | |||
77 | TYPO | This is a dummy. Throw me away. | |||
16 | TYPO | The code sample hello/5/features/step_definitions/greeter_steps.rb appears to be missing a blank line before “Given…”. | |||
145 | ERROR | In the middle of the page it says: | |||
338 | ERROR | The book says "The assigns() method returns a hash representing instance variables that were assigned to the view by the controller. Run rake spec:controllers, and the new expected #<Message:0x81b0b900 @name=“Message_1005”> however my failure message was: /Users/akkdio/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -S rspec ./spec/controllers/messages_controller_spec.rb Pending: Failures: 1) MessagesController POST create when the message fails to save successfully assigns @message Finished in 0.10912 seconds I added the following as the book suggests: def create and the example passes. I don’t know why but I never get the failure the book says I should get. | |||
340 | TYPO | the book text indicates that there is a change on the line: context “when the message fails to save” do Yet this is the same code as on page 339: it “assigns @message” do | |||
237 | TYPO | “pending_count)” missing a parentheses, should be “pending_count()”. I’m really enjoying this book so far. Thanks! | |||
179 | TYPO | Book has test-specific subclasspattern (with no space between subclass and pattern) | |||
210 | TYPO | 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 between the two. | |||
210 | TYPO | 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 between the two. | |||
215 | TYPO | 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’t a big deal. I’m just trying to give you more samples of what to look for. The book has: The output contains the contents of a hash with keys such as:example_group, :description,:location,:caller, and so on. There is a line wrap just before :description. The :foo words are in italics(?). Again, we see no space before the :foo words. Other examples, like on page 216: RSpec exposes a configuration object that supports the definition of global before, after, and around hooks, as well as hooks to include modules in examples or extend example group classes. format nicely (with “before”, “after”, “around”, and “include” in a different font (tt?) HTH | |||
14 | ERROR | Last then line missing closing $/ | |||
61 | TYPO | 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.rb). See Shouldn’t We Avoid a One-to-One Mapping?, on page 62 for” | |||
74 | TYPO | Chapter 6, introduction, first paragraph feature we’re going to tackle is to subimt a guess and get feedback from the “to subimt a” -> “to submit a” | |||
80 | 92 | ERROR | undefined method `[]’ for nil:NilClass (NoMethodError) | ||
201 | ERROR | 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:
My testing indicates otherwise. It is the ‘.as_null_object()’ that causes any subsequent calls to log() to be ignored. To prove this, simply create code that causes log() twice, observe that everything is ok, and then take out the ‘.as_null_object()’ (and the “@database.(begin|end)” lines if u have them. Observe then that repeated calls to log() will FAIL, and that they are not “caught by the stub and essentially ignored”! | |||
143 | TYPO | I try to implement all the suggestion you guys have provide but none of one work | |||
74 | TYPO | The third sentence contains ‘subimt’, should be ‘submit’ | |||
59 | TYPO | “subimt a guess” should read “submit a guess” in the third line of the first paragraph on page 59 of the PDF. | |||
41 | TYPO | “Cucumber will load features/support/env.rb, which now requires lib/code-breaker.rb, which” lib/code-breaker.rb should be lib/codebreaker.rb (i.e. remove the dash.) Page 40 tells you to make a codebreaker.rb file. Page 41 refers to it with a - in the name. | |||
74 | 59 | TYPO | Section 6.1, first paragraph: “subimt” should be “submit”. | ||
149 | 139 | TYPO | Third paragraph starts with a sentence fragment: “——> so you can refactor <—— There are a couple of…. etc” (arrows added for emphasis) | ||
1 | SUGGEST | The “should” expectation syntax (e.g. “[].should be_empty”) has been deprecated since RSpec 2.11. Hopefully you’ll be updating the code samples to use the preferred syntax, e.g. “expect([]).to be_empty” | |||
42 | SUGGEST | 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 replaced w/ a Test Double and a message expectation is set on “puts”, which feels like mocking a low-level API. Recommend renaming Output to View or Display or similar so we end up mocking e.g. view.display or display.show or similar rather than output.puts. | |||
117 | ERROR | marker = Marker.new(‘1234’,‘1155’) should be because the first 1 on the guess does match with de the first 1 on secret | |||
139 | TYPO | The third paragraph starts with so you can refactor which is suspended in mid-air. | |||
145 | SUGGEST | 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. To make it work as expected, split the yield : result = Thing.new do |thing| … end Another solution is : yield(Thing.new { |thing| … ————— file to test it ————— class Thing def do_fancy_stuff(*p) def set_status(p) describe Thing do
it “should do something when ok” do ————— output ————— $ rspec thing_spec.rb —format doc Thing Finished in 0.00045 seconds | |||
165 | SUGGEST | In section “Owned Collections”, paragraph 5, line 2 : players_on(). When it receives a message, it doesn’t understand (like players_on()), ——> I would suppress the comma after When it receives a message [ meaning : When it receives a message that it doesn’t understand (like players_on()) ] | |||
183 | SUGGEST | In section Stub Chain, second paragraph : Article.recent.published.authored_by(params[:author_id]) ——> shouldn’t it be article ? Also 3rd line from bottom : Article.stub(:recent).and_return(recent) Also Article.stub_chain on PDF page 184. | |||
182 | SUGGEST | Executing the example “describe WidgetsController”. $ gem install rails I have added four missing do’s and changed Widget to widget (except Widget.new()). WidgetsController NoMethodError: | |||
188 | SUGGEST | Section Custom Argument Matchers. I had difficulties to make an example with calculator.should_receive(:add).with(greater_than_3) working. During a Google search with GreaterThanThreeMatcher, I have found a Github page which was actually a copy of code/mocking/custom_arg_matchers_spec.rb. ——> it would be nice to add a green bar with this path before class GreaterThanThreeMatcher (fourth paragraph) and also on the next page before class GreaterThanMatcher. Note that I had to change module Spec to module RSpec. ——> and the error message for calculator = double(‘calculator’) is Double “calculator” received :add with unexpected arguments | |||
215 | SUGGEST | Section 16.1 Metadata ——> it would be nice to have a green bar with the path of the example : code/extending_rspec/metadata.rb before the example(s). | |||
258 | ERROR | Bottom of the page, the link in footnote 2 h__p://wiki.github.com/aslakhellesoy/cucumber/rdoc gives an error 404. | |||
3 | ERROR | Broken link in footnote 1 - the current link is at http(colon slash slash)blog(dotdaveastels(dot)com(dot)s3-website-us-west-2(dot)amazonaws(dot)com/2014/09/29/a-new-look-at-test-driven-development.html | |||
43 | ERROR | Completion of code on page 43 when running cucumber get “undefined method” error for messages. code snippet class Output def output Then /^I should see “([^”]*)"$/ do |message| | |||
43 | ERROR | Found correct to the previous error on forum. The following code causes a clash with RSpec’s BuiltIn::Output def output Changed this to: Then ….. Now receiving the correct “Expectations” failure of ‘….expected [] to include…..’ | |||
14 | SUGGEST | syntax Should has been deprecated replace with Expect Section 2.3 Hello Cucumber Scenario: …….. hello/4/features/step_definitions/greeter_steps.rb Given…. | |||
12 | ERROR | The ling greeting.should == “Hello RSpec!” is now depreciated for RSpec 3.0 due to the use of should. |