Is there a strategy or set of steps to follow to migrate from RSpec 2 to MiniTest::Spec
? I'd like to take a look at doing this for a large project but I'm not sure where to begin.
I haven't used MiniTest::Spec for that long, I'm working on porting over some of our tests myself, but here are the few things I've noticed coming from RSpec:
must
/wont
instead of should
/should_not
, and predicate matchers are gone so you can't say must_be_true
/must_be_false
or the like.context
, so you'll need to either change this to describe
or alias it.described_class
.before :all
.subject
must be set manually (I think, someone correct me if I'm wrong).So to answer your question, in terms of porting an existing suite of tests, I'm afraid you can't really do a simple find and replace, you'll have to port over each test file one at a time. Obviously, this means you have to determine whether the effort is worth it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With