beckje01 / grails-code-coverage

Git Repo of the Grails Code Coverage plugin.
http://grails.org/plugin/code-coverage
16 stars 26 forks source link

Solution for GPCODECOVERAGE-47 #3

Closed noamt closed 11 years ago

noamt commented 11 years ago

Grails controller field values are accessed by the post-test closure replacement procedures. Noticeable during integration tests, controllers are injected with additional fields from classes such as CommonWebApi. Some of these fields (such as the application context) cannot be accessed outside a request context, so they throw an exception during the replacement procedure.

Solution: added an iteration filter so that values are retrieved only for property descriptors of type Closure

beckje01 commented 11 years ago

Looks good, I will create a snapshot version tomorrow we can test with.

noamt commented 11 years ago

Cheers

noamt commented 11 years ago

Any updates on this? Is there anything I can do to help? I could really use this fix.

beckje01 commented 11 years ago

Sorry I was trying to use bintray to get a snapshot version I was having issues. I will work on this tonight sorry for the delay.

noamt commented 11 years ago

Yeah, no snapshot versions are allowed on Bintray :)

beckje01 commented 11 years ago

So that would be the problem not my configuration.

beckje01 commented 11 years ago

I have a snapshot at https://repo-beckje01.rhcloud.com/artifactory/grails-plugins-snapshot/ You may need to hit the url first to make sure the artifactory is running. It is working for me if you don't mind giving the snapshot build a test I will get this deployed to the plugin portal if it is fixing your problem.

noamt commented 11 years ago

Looks good!

cblume commented 11 years ago

Hey, I might need some help to set it up correctly. How do I reference the Snapshot and where? (I'm quite new to Grails. I assume it's an easy fix?)

noamt commented 11 years ago

I'm pretty sure that you can do it by adding to your BuildConfig.groovy file's repositories section the line:

mavenRepo "https://repo-beckje01.rhcloud.com/artifactory/grails-plugins-snapshot"

And then just install normally.

cblume commented 11 years ago

That was definitely it. Thanks a lot!