When the module mixed-in within the model block contains a class_eval that is run when the module is included, this class_eval was being run before each test on the same class, causing it to unexpectedly be re-evaluated, and causing unexpected behavior in things such as included ActiveRecord callbacks.
When the module mixed-in within the
model
block contains aclass_eval
that is run when the module is included, thisclass_eval
was being run before each test on the same class, causing it to unexpectedly be re-evaluated, and causing unexpected behavior in things such as included ActiveRecord callbacks.Tests passing under 1.8.7p352 & 1.9.2p290.