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 initial thoughts are that any model that add these behaviors
"should" have this specified in their spec. With that in mind, I was
leaning towards creating a module that when included inside a model
spec adds the necessary specifications to ensure the behavior is there
and is executing as intended. However, before proceeding too far I
wanted to run it by the collective to hear your thoughts as I am sure
this has been tackled by others in the community already (although
google didn't yield anything noteworthy).
Thanks,
Anthony Broad-Crawford
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users