Skip to content

Commit 46c07ea

Browse files
committed
Fix failing test
1 parent bda36ea commit 46c07ea

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

grails-plugin-events/src/test/groovy/grails/events/SpringEventTranslatorSpec.groovy

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ import spock.lang.Specification
3030
class SpringEventTranslatorSpec extends Specification {
3131

3232
void "Test event translator translates Spring events"() {
33-
given:"A translator"
33+
setup:
34+
def env = Environment.initialize()
35+
3436

3537
def eventBus = Mock(EventBus)
3638
def translator = new SpringEventTranslator(eventBus: eventBus)
@@ -42,6 +44,9 @@ class SpringEventTranslatorSpec extends Specification {
4244

4345
then:"The event bus is notified"
4446
1 * eventBus.notify("spring:contextStarted", _)
47+
48+
cleanup:
49+
env.close()
4550
}
4651

4752
}

0 commit comments

Comments
 (0)