automatically find and load 3rd party test macros
Reported by Tammer Saleh | August 4th, 2008 @ 03:40 PM
Since we're writing lots of macros for our apps, and it's becoming hard to keep track of them, we started a convention of putting each macro (or set of macros) in a separate file under test/macros/.
Shoulda should search for any test/macros/*.rb file, and automatically require it. In addition, to make it easy for plugin/gem authors to include shoulda macros, we should require the vendor/plugins/*/shoulda_macros/*.rb and vendor/gems/*/shoulda_macros/*.rb files.
Comments and changes to this ticket
-
Dan Croak August 4th, 2008 @ 03:44 PM
+1
For consistency, I'd like the test version to use the same naming convention. e.g. test/shoulda_macros/*.rb instead of test/macros/*.rb
-
Tammer Saleh August 4th, 2008 @ 03:50 PM
Dan - good point, and I agree. we were using "macros" before, but renaming is worth it.
-
Tammer Saleh August 4th, 2008 @ 04:17 PM
- → State changed from new to committed
This has been committed.
-
Dan Croak August 4th, 2008 @ 04:23 PM
Tammer,
This would be worth a blog post after a few shoulda macros have been created in other gems/plugins (so people can see examples). It should also be stressed that macros need to be tested.
-
-
-
Ryan McGeary August 31st, 2008 @ 01:25 PM
- → State changed from new to committed
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
