I swear I remember seeing (and using) a script or rake task that
converted Test::Unit based test files to a shoulda context. I can't
find even a mention of it anywhere, so maybe it was all a beautiful
dream. Does this sound familiar to anyone else? Do you know where I
can find it?
Thanks!
Sean
Indeed, it wasn't a dream!
There is a script to convert between test::unit and shoulda syntax,
and I've been meaning to check it over for bugs and add it to the
documentation. It's in the git repository, so you should have it as
vendor/plugins/shoulda/bin/convert_to_should_syntax. Here's the link
in git:
http://github.com/thoughtbot/shoulda/tree/master/bin/convert_to_should_syntax
As usual, please feel free to file a lighthouse ticket, or make a git
branch with fixes if you find problems with the script. It should
probably be converted to a rake task at some point.
Cheers,
Tammer
* it runs the tests before and after, making sure the test count is
the same
* it fixes the bug mentioned below
* it runs for multiple files
When I get a chance (or when some kind volunteer does), it should be
converted into a rake task so that it's documented and easy to use.
Something like "rake shoulda:convert_files FILES=test/unit/*.rb"
Tammer