forked from grails/grails-core
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
3 changed files
with
37 additions
and
6 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
30 changes: 30 additions & 0 deletions
30
...c/test/groovy/org/codehaus/groovy/grails/commons/metaclass/LazyMetaPropertyMapSpec.groovy
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,30 @@ | ||
package org.codehaus.groovy.grails.commons.metaclass | ||
|
||
import grails.test.mixin.TestMixin | ||
import grails.test.mixin.support.GrailsUnitTestMixin | ||
import spock.lang.Specification | ||
|
||
/** | ||
* See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for usage instructions | ||
*/ | ||
@TestMixin(GrailsUnitTestMixin) | ||
class LazyMetaPropertyMapSpec extends Specification { | ||
|
||
def setup() { | ||
} | ||
|
||
def cleanup() { | ||
} | ||
|
||
void "test putAll adds all key and value pairs provided to this map"() { | ||
given: | ||
def targetMap = new LazyMetaPropertyMap(new A()) | ||
when: | ||
targetMap.putAll([someProperty:"a value"]) | ||
then: | ||
targetMap == [someProperty:"a value"] | ||
} | ||
} | ||
class A { | ||
def someProperty = "value" | ||
} |
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