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

Stop using globally exposed DSL #2420

Merged
merged 3 commits into from
Dec 22, 2020
Merged

Stop using globally exposed DSL #2420

merged 3 commits into from
Dec 22, 2020

Conversation

pirj
Copy link
Member

@pirj pirj commented Dec 19, 2020

@pirj pirj self-assigned this Dec 19, 2020
@@ -1,6 +1,6 @@
require 'pathname'

shared_examples_for "an rspec-rails example group mixin" do |type, *paths|
RSpec.shared_examples_for "an rspec-rails example group mixin" do |type, *paths|
Copy link
Member Author

Choose a reason for hiding this comment

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

It seems that we require spec support files before RSpec.configure, and Core::DSL.expose_globally! was taking precedence. Interesting.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds about right

@JonRowe
Copy link
Member

JonRowe commented Dec 19, 2020

This is fine, but do you mind not merging until I've released a release for 6.1?

@JonRowe
Copy link
Member

JonRowe commented Dec 19, 2020

(As RSpec 4 will be sometime in the new year I suspect)

@pirj
Copy link
Member Author

pirj commented Dec 22, 2020

I had to make yet another change here, check If RSpec::Matchers.configuration.respond_to?(:syntax) to support both RSpec 3 & 4.

@JonRowe Do you mind if I merge this before we release rspec-rails 4.1? There are still a couple of issues to address there.

The usage of globally exposed DSL and removed disable_monkey_patching!/configuration.syntax forces me to hack zero monkey patching PRs to point to this PR (and all subsequent PRs that I intend to send for RSpec 4.0):

-  clone_repo "rspec-rails" "main"
+  clone_repo "rspec-rails" "remove-monkey-patching"

@JonRowe JonRowe merged commit 23383f1 into main Dec 22, 2020
@JonRowe JonRowe deleted the remove-monkey-patching branch December 22, 2020 08:49
@pirj
Copy link
Member Author

pirj commented Dec 22, 2020

Thanks!

JonRowe added a commit that referenced this pull request Dec 26, 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

Successfully merging this pull request may close these issues.

None yet

2 participants