Module: RSpec::Expectations::Syntax::ExpectExpressionGenerator Private

Defined in:
lib/rspec/expectations/syntax.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

+ (Object) negative_expression(target_expression, matcher_expression)

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.



156
157
158
# File 'lib/rspec/expectations/syntax.rb', line 156

def self.negative_expression(target_expression, matcher_expression)
  "expect(#{target_expression}).not_to #{matcher_expression}"
end

+ (Object) positive_expression(target_expression, matcher_expression)

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.



152
153
154
# File 'lib/rspec/expectations/syntax.rb', line 152

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