Go To Homepage



Book Details
The Definitive Guide to Grails, Second Edition book cover
  • By Graeme Rocher Jeff Brown
  • ISBN13: 978-1-59059-995-2
  • ISBN10: 1-59059-995-0
  • 648 pp.
  • Published Jan 2009
  • Print Book Price: $46.99
  • eBook Price: $32.89



Errata Submission

If you think that you've found an error in The Definitive Guide to Grails, Second Edition, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

Submit Errata
The Definitive Guide to Grails, Second Edition (978-1-59059-995-2)

Errata

Issue Author's Response
In chapter 1, the test doesn't seem to work:
code from book:
class StoreControllerTests extends grails.test.ControllerUnitTestCase {

void testRenderHomePage() {
controller.index()
assertEquals "Welcome to the gTunes store!", controller.response.contentAsString
}
}

when grails test-app is run, it comes back with:
unable to resolve class grails.test.ControllerUnitTestCase

even when i use the code from the book......
class StoreControllerTests extends GroovyTestCase {

void testRenderHomePage() {
def controller = new StoreController()
controller.index()
assertEquals "Welcome to the gTunes store!", controller.response.contentAsString
}
}
it comes back with:

No signature of method: StoreController.render() is applicable for argument types: (java.lang.String) values: {"Welcome to the gTunes store!"}

Any ideas?
ps - i'm using grails 1.0.4/
The book covers the usage of Grails 1.1 and hence these examples won't work in 1.0.4
Chapter 4, after first list,

> A controller is a prototyped, m

sounds strange...
Thanks, fixed
ch 4, p 4-36
The last assertEquals in listing 4-55 should be checking against user.errors.lastName (presumably)
Fixed. Thanks
ch 4, p 4-35
The UserControllerTests is generated in 'test/integration', not 'test/unit'
In Grails 1.1 it is generated to test/unit
ch 4, p 4-32
In listing 4-52, the text should read 'Complete the form below' instead of 'Complete for the form below'
Already fixed. Thanks
ch 4, p 4-31
In listing 4-50, there is a stray </a> tag in the link to the store.
deleted stray tag, thanks
ch 4, p 4-31
'Since this capability is only available when logged we can' should be 'Since this capability is only available when logged in, we can'
I don't see this text in chapter 4?
Ch 2, p 2-1: The hibernate link shows as 'http hibernate://.org' instead of 'http://hibernate.org' Seems fixed already in the latest PDF renderings