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 code to warn about the should syntax. #326

Merged
merged 3 commits into from Sep 22, 2013

Conversation

penelopezone
Copy link
Member

@penelopezone penelopezone commented Sep 13, 2013

No description provided.

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
@coveralls
Copy link

coveralls commented Sep 13, 2013

Coverage Status

Coverage increased (+0.15%) when pulling dc8406b on samphippen:warn-about-the-should-syntax into 461fdfd on rspec:master.

def self.warn_about_should_unless_configured(method_name)
if @warn_about_should
RSpec.deprecate(
"Using #{method_name} from the old `:should` syntax without explicitly enabling the syntax.",
Copy link
Member

@myronmarston myronmarston Sep 13, 2013

Choose a reason for hiding this comment

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

After seeing the rspec-mocks deprecation in action, I improved it:

rspec/rspec-mocks@fd78578

Removing the trailing period is particularly important as the warning print " is deprecated" after it. Using backticks around the method name is nice, too.

@coveralls
Copy link

coveralls commented Sep 21, 2013

Coverage Status

Coverage increased (+0.15%) when pulling 285a5aa on samphippen:warn-about-the-should-syntax into 461fdfd on rspec:master.

@coveralls
Copy link

coveralls commented Sep 21, 2013

Coverage Status

Coverage increased (+0.15%) when pulling 285a5aa on samphippen:warn-about-the-should-syntax into 461fdfd on rspec:master.

@penelopezone
Copy link
Member Author

penelopezone commented Sep 22, 2013

@myronmarston can I get a rereview please?

@@ -23,6 +23,12 @@ Bug fixes
(Brandon Turner)
* Fix diffing of hashes with object based keys. (Jon Rowe)

Deprecations:

* Using the old :should syntax without explicitly configuring it is disabled.
Copy link
Member

@myronmarston myronmarston Sep 22, 2013

Choose a reason for hiding this comment

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

It's not disabled; it's deprecated. There's a big difference.

Also, it's nice to use backticks here for :should.

@myronmarston myronmarston merged commit 285a5aa into rspec:master Sep 22, 2013
@myronmarston
Copy link
Member

myronmarston commented Sep 22, 2013

I added a commit and merged it locally. I couldn't push a commit to this PR because it's based on your fork, @samphippen. In the future, please push a branch to rspec so that we can collaborate on it more easily.

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

3 participants