> -----Original Message----- > From: Dinko Srkoč [mailto:dinko.sr...@gmail.com] > Sent: Friday, October 09, 2015 12:39 AM > To: users@groovy.incubator.apache.org > Subject: Re: Code sample from packt Groovy book: help debug File > and output problems? > > On 8 October 2015 at 23:58, KARR, DAVID <dk0...@att.com> wrote: > > I'm reading through the packt book "Groovy for Domain-specific > Languages - Second Edition", which has a zip of sample code at the > following url: > https://www.packtpub.com/sites/default/files/Groovy%20for%20Domain- > specific%20Languages,%20Second%20Edition_0.zip > > > > When I run the build of this, it fails with a > FileNotFoundException in "RewardService.groovy". If you install > the zip and run the build, you should see the same thing. I've > looked at the File reference, and I don't understand why this is > failing. I've also run the particular test in the debugger, and > verified with the "Display" view that this File reference should > work. > > > > Assuming you see the same error, any idea why this is happening? > > There appears to be a typo in the path to the file that is being > evaluated (RewardService.groovy, line 109). Instead of > "BroadBandPlus" > there should be "BroadbandPlus" (notice the second 'B' vs 'b'). > Once > I'd changed that, all the tests passed.
Sigh. I stared and stared at that, and didn't see any difference. I don't know what platform you were using, but is the File(String) constructor running on MS Windows case-insensitive? > > Also, likely a Spock or Gradle question, but I can't figure out > how to get stdout from the test run to go to the console, or > anywhere I can find, for that matter. I found various references > that describe how to configure this, but none of them worked. I > asked about this on the Gradle forum.