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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
slavix t. (Guest)
on 2011-09-05 10:42
(Received via mailing list)
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) }

User shoulda validations
     Failure/Error: it { should
have_many(:balances).dependent(:destroy) }
       undefined method `dependent' for #<RSpec::Matchers::Matcher:
This topic is locked and can not be replied to.