I''ve got a cache sweeper running observing a model "after_validation_on_update". Inside that filter method, a call to "controller.current_user" is made to access that application_controller method (to get the current user in session). I get the error "NoMethodError: undefined method `current_user'' for nil:NilClass" when running my unit test because, by definition, there is no controller instantiated in a unit test. How do I get around this to test? Thanks for any help. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.