Forum: RSpec undefined method `dependent' - rspec and shoulda

Posted by slavix tube (slavix)
on 2011-09-05 08:42
(Received via mailing list)
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) }
     NoMethodError:
       undefined method `dependent' for #<RSpec::Matchers::Matcher:
0xb2d4294>
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.