[rspec-users] undefined method `dependent' - rspec and shoulda

2011-09-04 Thread slavix
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) }

Re: [rspec-users] mongo_mapper validations, rpsec

2011-09-04 Thread Chris Habgood
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

Re: [rspec-users] mongo_mapper validations, rpsec

2011-09-04 Thread Nick
What does the backtrace say?___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] mongo_mapper validations, rpsec

2011-09-04 Thread Chris Habgood
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

Re: [rspec-users] mongo_mapper validations, rpsec

2011-09-04 Thread Nick
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

[rspec-users] mongo_mapper validations, rpsec

2011-09-04 Thread Chris Habgood
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