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

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.



169
170
171
# File 'lib/rspec/collection_matchers/have.rb', line 169

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.



165
166
167
# File 'lib/rspec/collection_matchers/have.rb', line 165

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