Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MiniTest #36

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

blowmage
Copy link

Allow json_spec to be used from minitest tests.

So that users can decide whether to use json_spec with RSpec or MiniTest.
@laserlemon
Copy link
Contributor

Awesome, thank you! 👏 I don't personally use MiniTest but I'm going to try to pull somebody in who does to review this before I pull.

@phlipper
Copy link

@blowmage this is a very nice addition, thank you! 👍 from me.

@gaffneyc
Copy link
Member

@laserlemon: @jasonroelofs keeps talking about how we should use MiniTest more, he might be a good candidate

@laserlemon
Copy link
Contributor

By all means @jasonroelofs, please chime in!

@jasonroelofs
Copy link

Well you guys know me, I love MiniTest and anything that helps people use MiniTest more is 👍 from me!

@laserlemon
Copy link
Contributor

@jasonroelofs If you get a second, could you take a look at the commits/changes and let us know how it looks from another MiniTest user's perspective?

@laserlemon
Copy link
Contributor

@blowmage I swear I don't distrust you as much as it sounds in this thread!

@blowmage
Copy link
Author

@laserlemon lulz!

@jasonroelofs
Copy link

Nothing jumps out at me with this commit. As it is trying to keep the syntax of json_spec the same while allowing the use of MiniTest or Rspec under the hood I'd say it's done a good job of that.

@rdamborsky
Copy link

+1

@johnsinco
Copy link

Hi is this pulled? We'd like to make use of your gem in our minitest specs. Thx!!

if defined?(RSpec)
RSpec.configure do |config|
config.include JsonSpec::Matchers
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are expanding these matchers to work elsewhere I'd rather have all configuration taken care either in its own file or required by the user in the test helper.

For rspec we could require the user to simply add this configuration to their spec_helper.
For minitest is there any better way to handle registering methods, so we could take them out of this file?
Are the classic assertions still highly used of could we get by without supporting them?

@benwoodward
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants