Every repository with this icon (
Every repository with this icon (
Shoulda Macros
Included here are macros for the testing sugar that is Shoulda. There are tests for the following plugins:
- ActsAsFerret –
should_act_as_ferret - Paperclip (lifted from Thoughtbot) –
should_act_as_paperclip - ActsAsTaggableOnSteroids –
should_act_as_taggable_on_steroids - ActsAsList –
should_act_as_list
There is also a macro that I stole from the Thoughtbot project Clearance called should_have_form, that is a bit more full-featured than Shoulda’s should_render_a_form. I’m assuming it will eventually make it into Shoulda.
Place these files in RAILS_ROOT/test/shoulda_macros, and they will be automatically required when running tests. For some usage examples, see http://soyunperdedor.com/node/34.
I will continue to add macros as I accumulate them.
Shoulda Plugin Macros elswhere
If you are in need of more plugin-related Shoulda macros, you should look into Woulda.
Woulda: http://github.com/seanhussey/woulda/tree/master
The plugin macros you see here are included in the Woulda gem, along with macros for acts_as_paranoid, attachment_fu, enumeration_mixin, will_paginate, and acts_as_solr (as of October 3rd, 2008).







