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.



194
195
196
# File 'lib/rspec/collection_matchers/have.rb', line 194

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.



190
191
192
# File 'lib/rspec/collection_matchers/have.rb', line 190

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