Class: Transpec::Syntax::ShouldReceive::AllowRecordBuilder

Inherits:
ExpectBaseRecordBuilder show all
Defined in:
lib/transpec/syntax/should_receive.rb

Instance Attribute Summary

Attributes inherited from ExpectBaseRecordBuilder

#negative_form_of_to, #should_receive

Instance Method Summary collapse

Methods inherited from ExpectBaseRecordBuilder

#initialize, #new_syntax

Methods inherited from RecordBuilder

build, #build

Constructor Details

This class inherits a constructor from Transpec::Syntax::ShouldReceive::ExpectBaseRecordBuilder

Instance Method Details

#old_syntax ⇒ Object



207
208
209
210
211
212
# File 'lib/transpec/syntax/should_receive.rb', line 207

def old_syntax
  syntax = super
  syntax << '.any_number_of_times' if should_receive.any_number_of_times?
  syntax << '.at_least(0)' if should_receive.at_least_zero?
  syntax
end

#syntax_name ⇒ Object



203
204
205
# File 'lib/transpec/syntax/should_receive.rb', line 203

def syntax_name
  'allow'
end