Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove old predicates before redefining #2354

Merged
merged 1 commit into from
Jun 10, 2020
Merged

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented Jun 10, 2020

In an ideal world we'd not do this but because we are mixing into rspec-cores configuration this is preferable to inventing our own.

@JonRowe JonRowe requested a review from pirj June 10, 2020 11:08
@JonRowe JonRowe force-pushed the fix-warnings-in-rspec-core branch from 9da5de4 to 165222b Compare June 10, 2020 11:38
Copy link
Member

@pirj pirj left a comment

Choose a reason for hiding this comment

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

Leaving the implementation details up to you. Either works 👍

@@ -117,22 +118,27 @@ def rendering_views?
# to the bug fix in rspec/rspec-core#2736, note some of these
# predicates are a bit nonsensical, but they exist for backwards
# compatibility, we can tidy these up in `rspec-rails` 5.
undef :fixture_path? if respond_to?(:fixture_path?)
Copy link
Member

Choose a reason for hiding this comment

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

I'm on the fence between this and

config.singleton_class.class_eval { attr_accessor :fixture_path }
# ...
def fixture_path?
  !!fixture_path
end

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not, I want to stick with add_setting as much as possible, these work arounds will be removed in the next version major version of rspec-rails.

@JonRowe JonRowe merged commit b3ebb94 into master Jun 10, 2020
@JonRowe JonRowe deleted the fix-warnings-in-rspec-core branch June 10, 2020 12:43
JonRowe added a commit that referenced this pull request Jun 10, 2020
JonRowe added a commit that referenced this pull request Jun 10, 2020
Remove old predicates before redefining
JonRowe added a commit that referenced this pull request Jun 10, 2020
pirj pushed a commit that referenced this pull request Aug 2, 2020
This was referenced Mar 15, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants