Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Fix caller filter to ignore rubygems #64

Merged
merged 2 commits into from
May 13, 2014

Conversation

myronmarston
Copy link
Member

This fixed rspec/rspec-core#1524.

I debated whether or not we should add code here to ignore rubygems but ultimately decided it was easier then auditing every RSpec.deprecate call to see if it could be triggered by a user require statement, so while this doesn't quite align with the first_non_rspec_line (since rubygems is non-rspec) it solves the problem and serves the purpose for which we created the caller filter.

Thoughts?

/cc @JonRowe @xaviershay


$_caller_filter = nil

expect {
Copy link
Member

Choose a reason for hiding this comment

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

cough do/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.

This is the one place I prefer curlies for multiple lines...because "do" and "end" are english words I think it's odd to have them in the middle of an expect { }.to matcher expression. The curlies, as punctuation, don't have that problem.

Funny to see that are preferences as a team are all over the map on this :).

@JonRowe
Copy link
Member

JonRowe commented May 13, 2014

I'm on board with this, makes sense to me.

myronmarston added a commit that referenced this pull request May 13, 2014
@myronmarston myronmarston merged commit 454b094 into master May 13, 2014
@myronmarston myronmarston deleted the fix-callerfilter-ignore-rubygems branch May 13, 2014 16:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecation warning for rspec/autorun lists the wrong line
2 participants