Jeff Scott Brown

Results 148 comments of Jeff Scott Brown
trafficstars

@urmichm Does the test at https://github.com/osscontributor/issue13506/blob/25d620dd85b666ba5c0a3b9ad194dcabc739ac63/src/test/groovy/issue13506/MyControllerSpec.groovy pass for you?

> Hello, unfortunately no. That is interesting. Are you using Gradle to run the test? This is what I am seeing: https://gist.github.com/osscontributor/1786f4cce7e73aa943f3f6fc479fc4b4

> The DataSource is required in an unrelated Service which is in some other unrelated Controller. I have tried a few combinations of class dependencies and I haven't yet been...

> how do you mock or configure DataSource for unit tests? If you are using GORM, you generally wouldn't. The more common thing is to kind of mock GORM using...

@urmichm Can you share a link to a sample project which demonstrates the problem?

> I assume that it might be that you are calling another controller from the one under unit test. I believe there is no good reason to do that in...

I am investigating this issue. At https://github.com/osscontributor/issue13486 I have a simple sample that demonstrates the issue: [grails-app/controllers/issue13486/DemoController.groovy](https://github.com/osscontributor/issue13486/blob/4c23882e6ec10bbf37604c41c6284daba02dc0b8/grails-app/controllers/issue13486/DemoController.groovy) ```groovy package issue13486 class DemoController { def list(DemoCommand x) { } // commenting...

Will investigate whether or not https://github.com/grails/grails-core/commit/c46d2cd9f5fbe9305def590ef88021ad8ca6bdcb is relevant. (looks unlikely right now)

FYI... The expression at https://github.com/grails/grails-core/blob/v6.0.0/grails-plugin-controllers/src/main/groovy/org/grails/compiler/web/ControllerActionTransformer.java#L853 does appear to be relevant, details still not entirely clear.

FYI, For an update, this is what I am seeing. If I declare a method in the controller like this… ```groovy private void placeToDeclareLocalVariable() { String x } ``` The...