Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

mockFSM Fix #1

Merged
merged 1 commit into from

2 participants

@dhighwayman
  • Al hacer mockFsm sobre una clase su constructor ha de devolver la instancia.
  • mockFSM no sobrescribe el setter de la propiedad sobre la que se aplica la maquina de estados.
@dhighwayman dhighwayman mockFSM Fix
* Al hacer mockFsm sobre una clase su constructor ha de devolver la instancia.
* mockFSM no sobrescribe el setter de la propiedad sobre la que se aplica la maquina de estados.
5c50ef0
@jorgeuriarte jorgeuriarte merged commit da7f217 into jorgeuriarte:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 30, 2013
  1. @dhighwayman

    mockFSM Fix

    dhighwayman authored
    * Al hacer mockFsm sobre una clase su constructor ha de devolver la instancia.
    * mockFSM no sobrescribe el setter de la propiedad sobre la que se aplica la maquina de estados.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/groovy/grails/plugin/fsm/FsmUtils.groovy
View
4 src/groovy/grails/plugin/fsm/FsmUtils.groovy
@@ -42,8 +42,7 @@ class FsmUtils {
log.error("Default value of '${domainClass}.${p}' will be overriden by FSM definition for that property. ")
// Modify the metaclass so new instances will have new behaviour!!
- domainClass.metaClass.setProperty(p, start)
- domainClass.metaClass.setProperty("_fsm${p}", null) // internal, will hold FsmSupport instance
+ domainClass.metaClass.setProperty("_fsm${p}", null) // internal, will hold FsmSupport instance
domainClass.metaClass.fire = fireClosure
domainClass.metaClass."fire_${p}" = fireClosure.curry(p)
domainClass.metaClass.fireable = fireableClosure
@@ -70,6 +69,7 @@ class FsmUtils {
bean."${pp}" = startstart
}
}
+ bean
}
}
}
Something went wrong with that request. Please try again.