Displaying 1 result from an estimated 1 matches for "activerecordassociationmatch".
Did you mean:
activerecordassociationmatcher
2007 Aug 10
0
ActiveRecordAssociationMatcher
I''ve started to put together a custom expectation matcher for
specifying AR associations. Its not quite complete and I really need
to put some specs together for it, but I''d appreciate any comments.
It lets you spec your associations like this:
describe Record do
include 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 =>
:writer...