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

Should the documentation suggest using the unreleased version of shoulda-context for Minitest users? #1250

Closed
LunaCodeGirl opened this issue Nov 5, 2019 · 3 comments

Comments

@LunaCodeGirl
Copy link

LunaCodeGirl commented Nov 5, 2019

We're a bit behind in supporting Minitest at the moment. I don't think we even test that you can use controller matchers in an ActionDispatch::IntegrationTest (although in theory they should work).

I know the README advises staying on shoulda-matchers 2.x, but given that we are to 4.x now, what if you try upgrading? There's a pre-release version of shoulda-context out that should fix any compatibility issues. Instead of using this in your gemfile,

gem 'shoulda', '~> 3.5'
gem 'shoulda-matchers', '~> 2.0'

try:

gem 'shoulda-context', '2.0.0.rc2'
gem 'shoulda-matchers', '~> 4.0'

Then add the following to your test_helper:

Shoulda::Matchers.configure do |config|
  config.integrate do |with|
    with.test_framework :minitest
    with.library :rails
  end
end

Originally posted by @mcmire in #1247 (comment)

I noticed this comment in #1247. I went ahead and tried this myself and was able to start using the v4.1.2 matchers without issue. I'm using Minitest. I'm curious what's holding back support of minitest with shoulda-context? And even so, should the docs for shoulda-matchers be updated to suggest people use the above suggestion instead of such an old version of shoulda-mathers?

@LunaCodeGirl
Copy link
Author

(Happy to make a PR, to do this, but figured I should ask around before assuming anything)

@mcmire
Copy link
Collaborator

mcmire commented Nov 5, 2019

For shoulda-context, nothing is really stopping a proper release, although I wanted to check it with existing projects to make sure I didn't break anything. I'm honestly not sure how many people still use it though, so maybe it's not a big deal. What I still have yet to do is wrap up some tests for shoulda, so that people can continue to use that instead of having to include shoulda-context and shoulda-matchers separately in their Gemfile. That said, I work on this in my free time and I don't get a lot of time to do this, so I can't say when that will be done. I would be fine with including some better and more up to date instructions in the README so that people aren't in limbo.

@mcmire
Copy link
Collaborator

mcmire commented Jun 14, 2020

I (finally) released Shoulda 4.0.0 and shoulda-context 2.0.0 today, which means I could also update the Minitest instructions in the README to match the RSpec instructions. So this should be fixed now!

@mcmire mcmire closed this as completed Jun 14, 2020
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

No branches or pull requests

2 participants