I'm a fairly novice tester, but have been trying to get better at TDD in Rails.
RSpec works great, but my tests are pretty slow. I've heard that MiniTest is a lot faster, and the MiniTest/Spec DSL looks pretty similar to how I'm used to working with RSpec, so I thought I'd give it a try.
However, I have not been able to find anything on the web that provides a walkthrough of how to setup and run Minitest. I learned how to test from the RSpec book, and I have no idea how Test::Unit or MiniTest are supposed to work. I have the gem in my gemfile, I've written a few simple tests, but I have no idea where to put them or how to run them. I figure this is one of those things that's so obvious nobody has bothered to write it down...
Can anyone explain to me how to setup some some Minitest/spec files and get them running so I can compare the performance against Rspec?
EDIT
Specifically these are the basics I most need to know:
- Do you need a test_helper file (like spec_helper) and if so how do you create it?
- How do you run minitest? There doesn't seem to be an equivalent to
rspec spec
orrspec path/to/file_spec.rb
, what am I missing?
Thanks!