Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
fix failng test
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Jun 24, 2013
1 parent 9e4f061 commit f8b45ff
Showing 1 changed file with 13 additions and 4 deletions.
Expand Up @@ -12,6 +12,12 @@ import spock.lang.Specification
import com.mongodb.DB

class GMongoSpec extends Specification {
void setup() {
ExpandoMetaClass.enableGlobally()
}
void cleanup() {
ExpandoMetaClass.disableGlobally()
}

def "Test configure and use gmongo"() {
given:
Expand Down Expand Up @@ -42,10 +48,13 @@ class GMongoSpec extends Specification {

then:
Person.count() == 1
Person.collection.count() == 1
Person.collection.findOne(firstName:"Fred").lastName == "Flintstone"
Person.withSession {
Person.collection.count() == 1
Person.collection.findOne(firstName:"Fred").lastName == "Flintstone"

db[Person.collectionName].count() == 1
db[Person.collectionName].findOne(firstName:"Fred").lastName == "Flintstone"

db[Person.collectionName].count() == 1
db[Person.collectionName].findOne(firstName:"Fred").lastName == "Flintstone"
}
}
}

0 comments on commit f8b45ff

Please sign in to comment.