DynamoMTL/spree_store_credits — pull request #1 by DanielWright (2013-06-13 14:40:24+00:00)
Title: Fixes consume_users_credits state-transition callback

My working theory is the typical approach of using a class_eval "decorator" to
extend Spree::Order via class_eval causes its state-machine to get
reinitialized, which has the unfortunate side-effect of nuking any custom
state-transitions. Injecting a an ActiveSupport::Concern module doesn't cause
this behaviour, so the crux of this fix is converting the Spree::Order
decorator to an ActiveSupport::Concern module.

It also takes some preliminary steps toward rationalizing the specs, which are
difficult to understand and, in some cases, broken.