grails-core
grails-core copied to clipboard
Mock Service | Grails 5.3.3
Expected Behavior
When running unit test on a controller
class MyControllerTest extends Specification implements ControllerUnitTest<MyController>, DataTest
I need to run unit tests for the controller
Actual Behaviour
Exception
NoSuchBeanDefinitionException: No qualifying bean of type 'absolutely.unrelated.Service'
Steps To Reproduce
- Grails 5.3.3
- Multiple contollers and services
"org.grails:grails-web-testing-support:3.1.2"
"org.grails:grails-gorm-testing-support:3.1.2"
Environment Information
Ububntu java 1.8
Example Application
No response
Version
5.3.3