Module: RSpec::CollectionMatchers::Syntax
- Defined in:
- lib/rspec/collection_matchers/have.rb
Defined Under Namespace
Modules: ExpectExpressionGenerator, ShouldExpressionGenerator
Class Method Summary collapse
-
.expression_generator ⇒ Object
private
Selects which expression generator to use based on the configured syntax.
-
.negative_expression(target_expression, matcher_expression) ⇒ Object
private
Generates a negative expectation expression.
-
.positive_expression(target_expression, matcher_expression) ⇒ Object
private
Generates a positive expectation expression.
Class Method Details
.expression_generator ⇒ 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.
Selects which expression generator to use based on the configured syntax.
171 172 173 174 175 176 177 |
# File 'lib/rspec/collection_matchers/have.rb', line 171 def self.expression_generator if RSpec::Expectations::Syntax.expect_enabled? ExpectExpressionGenerator else ShouldExpressionGenerator end end |
.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.
Generates a negative expectation expression.
165 166 167 |
# File 'lib/rspec/collection_matchers/have.rb', line 165 def self.negative_expression(target_expression, matcher_expression) expression_generator.negative_expression(target_expression, 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.
Generates a positive expectation expression.
159 160 161 |
# File 'lib/rspec/collection_matchers/have.rb', line 159 def self.positive_expression(target_expression, matcher_expression) expression_generator.positive_expression(target_expression, matcher_expression) end |