-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Allow rspec-rails to load without Rubygems loaded #1099
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
Conversation
👍 |
this is LGTM. @cupakromer @myronmarston got thoughts? |
This LGTM, although I wonder if we can take it a step further and just use |
Minitest itself tells you to "gem 'minitest'". AFAIK, you could just require it, though. On Tue, Jun 17, 2014 at 10:33 AM, Myron Marston [email protected]
|
Do we know what the risk of not doing |
Minitest might not be loaded. :) Here's the implementation of |
If we can I'd prefer to drop |
Right now I found: https://github.com/rails/rails/blob/e20dd73df42d63b206d221e2258cc6dc7b1e6068/activesupport/lib/active_support/testing/autorun.rb Though that doesn't appear to be required in any We'd need to check the different rails 3.x versions too :-/ |
I have an open pull request with rails to stop calling gem if it's not defined as well. I'm happy with just a conditional, but I'm also pretty sure that dropping them gem call will work just fine. On Tue, Jun 17, 2014 at 12:01 PM, Aaron Kromer [email protected]
|
Thinking about this some more...it'd be nice to drop the |
I’m perfectly happy with not dropping it, I’m just hoping to not call it if rubygems isn’t loaded. :) On Jun 17, 2014, at 12:36 PM, Myron Marston [email protected] wrote:
|
Is there anything I can change that would make this pull more acceptable? Thanks! |
It looks fine to me as-is. One part of the travis build failed with a transient error, so I restarted it. I'll leave it to @cupakromer to merge it. |
Yeah, I'm good with this. I plan on leaving this on the 3.1.x line only as a new feature. Let me know if anyone has any objections to that. |
Allow rspec-rails to load without Rubygems loaded
It's your call on this, but my instinct is that this is a bug fix. Without this change, don't users get a |
I'd say this was a bug fix too. |
K. Done and done. (ᵔᴥᵔ) |
Update Changelog per #1099.
Rspec-rails is a great gem citizen, and doesn't explicitly require Rubygems anywhere. However, while working on a Rails app that doesn't require Rubygems before loading Rails, we've noticed that rspec-rails expects Rubygems to be loaded even though it doesn't require it.
This pull request simply checks for Rubygems before calling Rubygems methods, so that rspec-rails works without Rubygems already being loaded.