module RSpec::CollectionMatchers::Syntax

Public Class Methods

expression_generator() click to toggle source

@api private Selects which expression generator to use based on the configured syntax.

# File lib/rspec/collection_matchers/have.rb, line 167
def self.expression_generator
  if RSpec::Expectations::Syntax.expect_enabled?
    ExpectExpressionGenerator
  else
    ShouldExpressionGenerator
  end
end
negative_expression(target_expression, matcher_expression) click to toggle source

@api private Generates a negative expectation expression.

# File lib/rspec/collection_matchers/have.rb, line 161
def self.negative_expression(target_expression, matcher_expression)
  expression_generator.negative_expression(target_expression, matcher_expression)
end
positive_expression(target_expression, matcher_expression) click to toggle source

@api private Generates a positive expectation expression.

# File lib/rspec/collection_matchers/have.rb, line 155
def self.positive_expression(target_expression, matcher_expression)
  expression_generator.positive_expression(target_expression, matcher_expression)
end