steve.tooke at gmail.com
Fri Aug 10 10:29:47 EDT 2007
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
it "should belong to artist and use a counter cache" do
Record.should belong_to(:artist).with_options(:counter_cache => true)
it "should have_many tracks" do
Please see my blog entry or the pastie for more details.
More information about the rspec-users