Module: RSpec::CollectionMatchers::Syntax::ShouldExpressionGenerator Private
- Defined in:
- lib/rspec/collection_matchers/have.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Generates expectation expressions for the ‘should` syntax.
Class Method Summary collapse
- .negative_expression(target_expression, matcher_expression) ⇒ Object private
- .positive_expression(target_expression, matcher_expression) ⇒ Object private
Class Method Details
.negative_expression(target_expression, matcher_expression) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
186 187 188 |
# File 'lib/rspec/collection_matchers/have.rb', line 186 def self.negative_expression(target_expression, matcher_expression) "#{target_expression}.should_not #{matcher_expression}" end |
.positive_expression(target_expression, matcher_expression) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
182 183 184 |
# File 'lib/rspec/collection_matchers/have.rb', line 182 def self.positive_expression(target_expression, matcher_expression) "#{target_expression}.should #{matcher_expression}" end |