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

78e7109f5fd74ae07678541288f0a417?d=identicon&s=25 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>
This topic is locked and can not be replied to.