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 require: false to Gemfile example #123

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

r7kamura
Copy link

If you run require 'rspec/core' before the appropriate timing, Kernel.#context would be defined unexpectedly and you will get a warning when you load irb. The following Issue provides more information on this issue.

This Gem executes require 'rspec/core' when loaded, so if it is loaded in a Rails app with Bundler.require it will cause this problem. This pull request solves this problem.

require 'rspec/core'

$ bin/rails c -e test
Loading test environment (Rails 7.0.4)
irb: warn: can't alias context from irb_context.
irb(main):001:0> exit

Since the README already explains to write require 'rspec/retry', there is no problem to explain to add require: false like this.

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.

None yet

1 participant