You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify one-liner syntax cannot be used with block matchers
Users sometimes try to use the one-liner syntax with block matchers,
which can cause RSpec to behave in strange ways. This behaviour is not
supported in RSpec because the complexity of implementing it would
greatly outweigh the benefits.
This commit just clarifies in the documentation that the one-liner
syntax does not support block matchers.
Possible fix for rspec/rspec-expectations#805
Copy file name to clipboardExpand all lines: features/subject/one_liner_syntax.feature
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,7 @@ Feature: One-liner syntax
22
22
23
23
* This feature is only available when using rspec-expectations.
24
24
* Examples defined using this one-liner syntax cannot be directly selected from the command line using the [`--example` option](../command-line/example-option).
25
+
* The one-liner syntax only works with non-block expectations (e.g. `expect(obj).to eq`, etc) and it cannot be used with block expectations (e.g. `expect { object }`).
0 commit comments