I’m having trouble with “mock” and I can’t seem to find any reason for
this. The error…
NoMethodError in ‘UserObserver should not call
UserMailer.deliver_activation if user wasn’t recently activated’
mock' for Spec::Rails::Example::ModelExampleGroup::Subclass_3:Class ./spec/models/user_observer_spec.rb:6: /var/lib/gems/1.8/gems/activesupport-2.1.2/lib/active_support/callbacks.rb:177:incall’
And the code…
require File.dirname(FILE) + ‘/…/spec_helper’
context “A UserObserver” do
@user = mock(User)
@user_observer = UserObserver.instance
I’ve not found any other people with a similar issue via Google yet.
Any help is much appreciated.