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

Commit 6db6a6c

Browse files
committed
Merge pull request #1294 from rspec/fix-support-for-dynamic-matchers
Fix support for dynamic matchers
1 parent 0ab230c commit 6db6a6c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
### Development
2+
[Full Changelog](https://github.com/rspec/rspec-expectations/compare/v3.10.1...3-10-maintenance)
3+
4+
Bug Fixes:
5+
6+
* Fix support for dynamic matchers for expectation target checks (Phil Pirozhkov, #1294)
7+
18
### 3.10.1 / 2020-12-27
29
[Full Changelog](https://github.com/rspec/rspec-expectations/compare/v3.10.0...v3.10.1)
310

lib/rspec/expectations/expectation_target.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,7 @@ def enforce_block_expectation(matcher)
118118
end
119119

120120
def supports_block_expectations?(matcher)
121-
matcher.supports_block_expectations?
122-
rescue NoMethodError
123-
false
121+
matcher.respond_to?(:supports_block_expectations?) && matcher.supports_block_expectations?
124122
end
125123
end
126124
end

0 commit comments

Comments
 (0)