-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minimal test files to reproduce the issue
- Loading branch information
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package spock.bug | ||
|
||
class BarTagLib { | ||
static defaultEncodeAs = [taglib:'html'] | ||
//static encodeAsForTags = [tagName: [taglib:'html'], otherTagName: [taglib:'none']] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package spock.bug | ||
|
||
import grails.test.mixin.TestFor | ||
import grails.test.runtime.FreshRuntime | ||
import org.springframework.context.i18n.LocaleContextHolder | ||
import spock.lang.Specification | ||
import spock.util.mop.ConfineMetaClassChanges | ||
|
||
|
||
@ConfineMetaClassChanges([LocaleContextHolder]) | ||
@TestFor(BarTagLib) | ||
@FreshRuntime | ||
class BarSpec extends Specification { | ||
|
||
|
||
def 'bar' () { | ||
given: | ||
LocaleContextHolder.metaClass.static.setLocale = { Locale locale -> | ||
|
||
} | ||
expect: | ||
true | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package spock.bug | ||
|
||
import org.springframework.context.i18n.LocaleContextHolder | ||
import spock.lang.Specification | ||
import spock.util.mop.ConfineMetaClassChanges | ||
|
||
@ConfineMetaClassChanges([LocaleContextHolder]) | ||
class BazSpec extends Specification { | ||
|
||
def 'baz'() { | ||
given: | ||
LocaleContextHolder.locale = Locale.UK | ||
expect: | ||
Locale.UK == LocaleContextHolder.locale | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package spock.bug | ||
|
||
import org.springframework.context.i18n.LocaleContextHolder | ||
import spock.lang.Specification | ||
import spock.util.mop.ConfineMetaClassChanges | ||
|
||
@ConfineMetaClassChanges(LocaleContextHolder) | ||
class FooSpec extends Specification { | ||
|
||
def 'foo'() { | ||
given: | ||
LocaleContextHolder.metaClass.static.getLocale = { Locale.UK } | ||
expect: | ||
true | ||
} | ||
} |