Closed andrewmarkle closed 5 years ago
Not against adding RSpec support but we are not RSpec users so we would have to rely on contributions from the community.
I'll take a crack at it.
Hey everyone. I've been thinking about this a fair bit but would like a bit of guidance for how to proceed. Right now minitest is baked-in to the current version. Very much a required dependency. If we were to add in rspec support I'm curious would that would look like?
I've been browsing around different gems and I like how the mutant gem solves this problem. The basic strategy would be to have two additional gemspecs. One for minitest and one for Rspec.
The main difference for users is that in your gemfile one would have to declare which one you want. Either gem 'deprecation_toolkit-minitest'
or gem 'deprecation_toolkit-rspec'
.
Would appreciate any thoughts!
Not much a fan of this. I think we can remove the runtime dependency on minitest and only try to load it when the parts that depend on minitest are used.
Currently only minitest is supported but it would be great to include out-of-the-box support for rspec as well.
I managed to get this (sort-of) working by adding it to my rspec rails_helper file.
And this config in my config/test.rb
While this works (it'll create a yaml file where you tell it to go) it's not in the correct folder structure nor does it have the right test naming. The challenge is in how minitest vs rspec names it's test cases. There would have to be some change in
ReadWriteHelper
for it to work asself.name
is not a thing in rspec. (In my example I've hackily gotten around this by passing inself.class
which does respond_to.name
).Happy to help more with this one if you want!