Displaying 1 result from an estimated 1 matches for "and_opt".
Did you mean:
adopt
2007 Aug 10
0
ActiveRecordAssociationMatcher
...clude ActiveRecordAssociationMatchers
it "should belong to artist and use a counter cache" do
Record.should belong_to(:artist).with_options(:counter_cache => true)
end
it "should have_many tracks" do
Record.should
have_many(:tracks).with_class_name("Song).and_options(:include =>
:writers)
end
end
Please see my blog entry or the pastie for more details.
http://stevetooke.karmatrading.co.uk/2007/8/10/simple-rails-association-matching-with-rspec
http://pastie.caboo.se/86604