bito-code-review[bot] commented on PR #16302: URL: https://github.com/apache/grails-core/pull/16302#issuecomment-5518659822
<!-- Bito Reply --> The suggestion to extract `TestBean` into a dedicated shared test fixture is appropriate. Coupling test specs by defining classes at the bottom of a file can lead to maintenance challenges and brittle tests, especially if the source spec is refactored or removed. Moving the fixture to a shared location like `src/test/groovy/grails/plugin/formfields/mock/TestBean.groovy` improves modularity and allows multiple specs to reuse the same test data structure safely. **grails-fields/src/test/groovy/grails/plugin/formfields/TemplateLookupCachingSpec.groovy** ``` def bean1 = new TestBean(stringProperty: 'Bart Simpson') def bean2 = new TestBean(stringProperty: 'Lisa Simpson') ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
