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

Fix negated matcher fluent interface #656

Merged
merged 2 commits into from Sep 23, 2014

Conversation

myronmarston
Copy link
Member

This fixes a bug in negated matchers, exposed by rspec/rspec-core#1704.

@myronmarston myronmarston changed the title Fix negated matdcher fluent interface Fix negated matcher fluent interface Sep 23, 2014
return return_val unless return_val.respond_to?(:description)
AliasedMatcher.new(return_val, @description_block)
return return_val unless RSpec::Matchers.is_a_matcher?(return_val)
self.class.new(return_val, @description_block)
Copy link
Member

Choose a reason for hiding this comment

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

Ahah!

@JonRowe
Copy link
Member

JonRowe commented Sep 23, 2014

LGTM

myronmarston added a commit that referenced this pull request Sep 23, 2014
@myronmarston myronmarston merged commit 47bc4a0 into master Sep 23, 2014
@myronmarston myronmarston deleted the fix-negated-matdcher-fluent-interface branch September 23, 2014 15:04
@myronmarston
Copy link
Member Author

Cherry picked to 3-1-maintenance.

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