small medium large xlarge

Mva.2008.05_pragsmall
19 Feb 2017, 13:49
Manuel E Vidaurre Arenas (8 posts)

Firsts guys, thank you for putting this together, I know writing books is not an easy process.

I’m started reading the Beta. In page 5, section Your First Spec, IMHO maybe will be best no to have the line Sandwich = Struct.new(:taste, :toppings) in 01-getting-started/02/spec/sandwich_spec.rb because that line as you know implements the spec that you are defining. I know in a book you need to find a balance about what to cover and what not, and also to serve different audiences, but this seems a section for newbies, then I think to expose them briefly from the beginning to the Red, Green, Refactor cycle will be useful.

Please consider this, present first the Spec thinking about the kind of code we will like to have, and then after failing in Red to add the easiest implementation, in this case, the Struct.

Thank you

Manuel

Myron-profile-img_pragsmall
21 Feb 2017, 01:33
Myron Marston (10 posts)

Thanks for the idea; it’s definitely something we’ll consider.

Myron

Mr_sketchy_pragsmall
21 Feb 2017, 20:12
Ian Dees (212 posts)

Hi, Manuel.

Thanks for the observation! Myron and I have talked about this chapter, and we agree with you that it makes sense to show a failing spec first, and then add the Struct definition afterward. We’ve made the change to the book; the next version of the beta should have the update.

Sincerely,

Ian

You must be logged in to comment