I have not used MiniTest :: Spec for a long time, I am porting some of our tests myself, but here are a few things I noticed from RSpec:
- The matches, of course, are different - this is
must / wont instead of should / should_not , and the predicate patterns have disappeared, so you cannot say must_be_true / must_be_false or the like. - However, if you write custom RSpec mappings or use tooltip sockets or the like, you can use them with MiniTest thanks to the miniature matrix. But YMMV.
- MiniTest :: Spec does not provide
context , so you need to either change this to describe or an alias. - MiniTest :: Spec also does not provide the
described_class . - You also don't have
before :all . subject must be set manually (I think someone correct me if I am wrong).
So, in order to answer your question, from the point of view of transferring an existing test suite, I am afraid that you cannot really just find and replace, you will have to port each test file one at a time. Obviously, this means that you need to determine whether to do it.
Elliot Winkler Apr 26 '12 at 8:13 2012-04-26 08:13
source share