Module: RSpec::CollectionMatchers::Syntax::ExpectExpressionGenerator 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 ‘expect` syntax.

Class Method Summary collapse

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.



181
182
183
# File 'lib/rspec/collection_matchers/have.rb', line 181

def self.negative_expression(target_expression, matcher_expression)
  "expect(#{target_expression}).not_to #{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.



177
178
179
# File 'lib/rspec/collection_matchers/have.rb', line 177

def self.positive_expression(target_expression, matcher_expression)
  "expect(#{target_expression}).to #{matcher_expression}"
end