mileszs / shoulda_macros
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
de271ad
tree d5436c5f07b1ecea592cb9e40822b5d761392e0b
parent e453f10c86505e52f427c42cf790ff0a53d04380
| name | age | message | |
|---|---|---|---|
| |
README.textile | Fri Oct 03 11:41:06 -0700 2008 | |
| |
functionals.rb | Fri Oct 03 11:37:46 -0700 2008 | |
| |
plugins.rb | Sat Sep 20 18:42:18 -0700 2008 |
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).
