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.
相关问题
- How to check block is called using rspec
- How to delete quotation marks in an array in Ruby
- Testing a rake task with passed parameters in rspe
- rspec - how to check that allow_blank exists
- Save_and_open_page not picking up scss markup
相关文章
- “No explicit conversion of Symbol into String” for
- Rspec controller error expecting <“index”> but
- How to use synchronize in Capybara exactly?
- Selecting a radio button with Rspec
- How to test a Singleton class?
- before(:each) for all tests except one
- Rounding problem with rspec tests when comparing f
- Why are my RSpec specs running twice?
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 ofshould
/should_not
, and predicate matchers are gone so you can't saymust_be_true
/must_be_false
or the like.context
, so you'll need to either change this todescribe
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.