Class: BasicObject
- Defined in:
- lib/rspec/expectations/syntax.rb
Overview
The legacy :should
syntax adds the following methods directly to BasicObject
so that they are available off of any object. Note, however, that this syntax does not always play nice with delegate/proxy objects. We recommend you use the non-monkeypatching :expect
syntax instead.
Instance Method Summary collapse
-
#should(matcher, message) ⇒ Boolean
Passes if
matcher
returns true. -
#should_not(matcher, message) ⇒ Boolean
Passes if
matcher
returns false.
Instance Method Details
#should(matcher, message) ⇒ Boolean
Note:
This is only available when you have enabled the :should
syntax.
Passes if matcher
returns true. Available on every Object
.
|
# File 'lib/rspec/expectations/syntax.rb', line 109
|
#should_not(matcher, message) ⇒ Boolean
Note:
This is only available when you have enabled the :should
syntax.
Passes if matcher
returns false. Available on every Object
.
|
# File 'lib/rspec/expectations/syntax.rb', line 121
|