spockframework / spockframework/spock

Grails UnitSpec does not clean up converters correctly

Open
#264 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Module-Grails Type-Defect
Dominant language
Java
Stars
3.6k
Forks
483
PR merge metrics
No merged PRs in 30d

Description

Originally reported on Google Code with ID 142

The attached project contains an equivalent unit test and unit spec. The latter leaves
something attached to the metaClass of Errors which breaks the functional spec. To
recreate run:

// should succeed - runs junit unit test and functional spec
grails test-app unit:unit functional:
// should fail - runs spock unit spec and functional spec
grails test-app unit:spock functional: --echoOut

We are using Grails 1.3.5 and Spock plugin 0.5-groovy-1.7-SNAPSHOT
The spock-grails-support jar data: 81863 Nov  4 04:34

Reported by robert.w.fletcher on 2010-11-05 11:04:14


- _Attachment: [json-meta-bug.tar.gz](https://storage.googleapis.com/google-code-attachments/spock/issue-142/comment-0/json-meta-bug.tar.gz)_

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached json-meta-bug.tar.gz project and reproduce the two listed grails test-app commands under Grails 1.3.5 with the Spock plugin. Compare the JUnit unit test and Spock unit spec, focusing on cleanup that leaves state attached to Errors' metaClass. Done means the Spock command's functional spec succeeds like the JUnit command.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, java
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.