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

slavix mikerin.slava at gmail.com
Mon Sep 5 01:36:05 EDT 2011


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>


More information about the rspec-users mailing list