Displaying 2 results from an estimated 2 matches for "stevetooke".
2007 Aug 10
0
ActiveRecordAssociationMatcher
...cord.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
2008 Mar 03
1
Rspec and plugins
I have a question regarding best practices around module and plugin
testing for rails applications. In our application we have created
several plugins that extend ActiveRecord::Base with class methods,
that when invoked in a model add behavior to that model. For
example ...
class SomeModel < ActiveRecord::Base
adds_some_cool_behavior
adds_another_wicked_sweet_behavior
end
My