GrailsInAction / graina2

Source code for the 2nd edition of Grails in Action
90 stars 92 forks source link

MEAP v9, listing 3.2, assertion is false #24

Closed marcpa00 closed 11 years ago

marcpa00 commented 11 years ago

The assertion (#5) is false as the sum of 3 and 7 is 10. If this is intentional, there should be a paragraph talking about seeing the test become red when run and how to fix it.

However, I think the first Spock test introduced should pass, unless you want to go into a discussion on the merit of writing tests that fails first, then make them run; but then, the test should fail not because of a error in the test but because of the code under test.

pledbrook commented 11 years ago

The introduction to Spock has now been moved to chapter 2 and this particular example has been replaced with another.

pledbrook commented 11 years ago

Oh, and just to clarify: the latest version of chapter 2 isn't yet in the MEAP, sorry :unamused: