Module: RSpec::Expectations::Syntax::ShouldExpressionGenerator 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 should 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.



146
147
148
# File 'lib/rspec/expectations/syntax.rb', line 146

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



142
143
144
# File 'lib/rspec/expectations/syntax.rb', line 142

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