hello,
Getting this error when using shoulda and rspec for model tests.
my gemfile
...
gem "shoulda-matchers"
..
spec file
..
it { should have_many(:balances).dependent(:destroy) }
error:
User shoulda validations
Failure/Error: it { should
have_many(:balances).dependent(:destroy) }
MongoMapper::DocumentNotValid:
Validation failed: Password can't be blank, Email can't be blank,
Password digest can't be blank
On Sun, Sep 4, 2011 at 19:06, Nick wrote:
> What does the backtrace say?
> ___
> rspec-users mailing list
> rspec-us
What does the backtrace say?___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Sorry, it fails validation which it should but it errors out in the cli as
opposed to going along and checking, it does not get past the inital factory
new line:
Failure/Error: user = Factory(:user, :email=> '', :password => '')
MongoMapper::DocumentNotValid:
Validation failed: Passwo
Hey Chris. Could you be more specific than "it blows up"? If there's a stack
trace, that'd be helpful.___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
I have a basic user class and doing rspec validations. When I do a factory
create to produce validations it blows up before I can get to the second
line to check for errors. Ideas how to get this to perform like AR
Validations?
MongoMapper::DocumentNotValid:
Validation failed: Password