So we have a fairly large rails 3 app using Test Unit. We’re wanting to switch to either MiniTest with spec, or Rspec and are doing some research on pros/cons. I would love any of your feedback. A few questions I have:
What major items does RSpec have that you would really miss with Minitest (with minitest/spec)?
What major differences do you see between them?
With Rspec’s wide usage, does the community support grant using it, and/or does anyone see a trajectory for either framework as far as community support goes?. .trends?
Moving to minitest we can do right now, but would using both test unit and rspec in an intermediate time be a major pain?
I’ve heard a pro for minitest for it’s simplicity/debugging… what are some examples of issues being run into because of Rspec’s complexity?
Redoing all your specs is pretty awful, and brings with it some technical risk. Minitest is backwards compatible with TestUnit, so while I like RSpec better, I think you’re better off just moving forward with Minitest if your app is already established and has test coverage.
I have somewhat of a preference for RSpec, but honestly the difference between the testing libraries you mentioned is fairly small.
If I had a very large app with a Test Unit suite, I would avoid rewriting it in RSpec. That’s lots of boring work for very little gain.
If I were you, I’d probably start converting my T::U tests into MiniTest, but I’d do it slowly. One approach I’ve used with success is to only convert a file of tests when you need to change it otherwise (though make sure it happens in its own commit).