Hi,
I'm trying to run autotest and I'm using ryanb's nifty authentication
with Rails 3 and Rpec 2. When I run autotest, the user model spec
fails all its validation tests with the "error_on" matcher.
If I run the spec by itself, it passes. If I'm running autotest and
make a trivial change to the s
On Nov 20, 8:43 pm, "Doug E." wrote:
> Hi,
> I'm trying to run autotest and I'm using ryanb's nifty authentication
> with Rails 3 and Rpec 2. When I run autotest, the user model spec
> fails all its validation tests with the "error_on" matcher.
>
> If I run the spec by itself, it passes. If I'm ru
Problem discovered, but not solved. It isn't an rspec problem. It's
caused by nifty-authentication's use of Mocha's any_instance.
users_controller_spec.rb's last test calls:
User.any_instance.stubs(:valid?).and_returns(true)
This is fine if the tests are run singly, but with autotest the call
Hey guys. My ApplicationController rescues
Mongoid::Errors::DocumentNotFound errors like this:
class ApplicationController < ActionController::Base
rescue_from Mongoid::Errors::DocumentNotFound,
:with => :resource_not_found
protected
def resource_not_found(error)
flash[:alert] = t(