Skip to content

Commit 9eea232

Browse files
thiagoaclaude
andcommitted
Document assert_duck_types_match and have_matching_duck_types in README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9c2a535 commit 9eea232

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@ assert_interfaces_match [StripeProcessor, PaypalProcessor],
135135
This is useful if your class implements multiple interfaces, in
136136
which case you can write an assertion for each.
137137

138+
If you prefer duck typing terminology, `assert_duck_types_match`
139+
is available as an alias.
140+
138141
### RSpec
139142

140143
Require the RSpec integration in your `spec_helper.rb`:
@@ -171,6 +174,9 @@ expect([StripeProcessor, PaypalProcessor])
171174
.to have_matching_interfaces(methods: %i[charge refund])
172175
```
173176

177+
If you prefer duck typing terminology, `have_matching_duck_types`
178+
is available as an alias.
179+
174180
#### Shared example
175181

176182
If you prefer shared examples, register one in `spec_helper.rb`

0 commit comments

Comments
 (0)