Permalink
Browse files

fix failing test

  • Loading branch information...
1 parent 8c1e5ca commit 115e6c8e22923cea0b13b216386c6edc7872ce9f @jeffbrown jeffbrown committed Apr 5, 2012
Showing with 17 additions and 5 deletions.
  1. +17 −5 test/unit/org/grails/rabbitmq/RabbitGrailsPluginTests.groovy
@@ -77,14 +77,15 @@ class RabbitGrailsPluginTests extends GroovyTestCase {
}
void testServiceDisabling() {
- def blueService = new MockQueueService(propertyName: 'blueService')
- def pinkService = new MockQueueService(propertyName: 'pinkService')
- def redService = new MockSubscribeService(propertyName: 'redService')
- def tealService = new MockSubscribeService(propertyName: 'tealService')
+ def mockBlueService = new MockQueueService(propertyName: 'blueService')
+ def mockPinkService = new MockQueueService(propertyName: 'pinkService')
+ def mockRedService = new MockSubscribeService(propertyName: 'redService')
+ def mockTealService = new MockSubscribeService(propertyName: 'tealService')
def application = new Object()
+
application.metaClass.getServiceClasses = {
- return [blueService, redService, pinkService, tealService]
+ return [mockBlueService, mockRedService, mockPinkService, mockTealService]
}
application.metaClass.config = new ConfigSlurper().parse("""
@@ -110,6 +111,17 @@ class RabbitGrailsPluginTests extends GroovyTestCase {
def base = createPluginFileInstance(application)
def bb = new BeanBuilder()
+ bb.beans {
+ 'pinkService'(MockQueueService) {
+ propertyName = 'pinkService'
+ }
+ 'blueService'(MockQueueService) {
+ propertyName = 'blueService'
+ }
+ 'tealService'(MockQueueService) {
+ propertyName = 'tealService'
+ }
+ }
bb.beans base.doWithSpring
def ctx = bb.createApplicationContext()

0 comments on commit 115e6c8

Please sign in to comment.