Code and tests at, http://gist.github.com/251480
I have debugged this code and both destroy and email! are being called! However, rspec/mocha says that the two expectations at the bottom of these tests are not met: both tests fail. Any help would be greatly appreciated. Thanks you in advance, Sam 1) Mocha::ExpectationError in 'ContactImport email should destroy the ear if the user is already a vbn member' not all expectations were satisfied unsatisfied expectations: - expected exactly once, not yet invoked: #<EmailedAssociationRequest:0x10685e088>.destroy(any_parameters) ... ./spec/models/contact_import_spec.rb:110: 2) Mocha::ExpectationError in 'ContactImport email should email the ear if the user is not already a vbn member' not all expectations were satisfied unsatisfied expectations: - expected exactly once, not yet invoked: #<EmailedAssociationRequest:0x1065fb700>.email!(any_parameters) ./spec/models/contact_import_spec.rb:120: Finished in 1.967623 seconds 16 examples, 2 failures -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
