Class: Transpec::Syntax::MethodStub::NoMessageAllowanceRecord

Inherits:
Record
  • Object
show all
Defined in:
lib/transpec/syntax/method_stub.rb

Instance Attribute Summary

Attributes inherited from Record

#annotation

Instance Method Summary collapse

Methods inherited from Record

#==, #hash, #to_s

Constructor Details

#initialize(method_stub) ⇒ NoMessageAllowanceRecord

Returns a new instance of NoMessageAllowanceRecord.



237
238
239
# File 'lib/transpec/syntax/method_stub.rb', line 237

def initialize(method_stub, *)
  @method_stub = method_stub
end

Instance Method Details

#converted_syntaxObject



248
249
250
# File 'lib/transpec/syntax/method_stub.rb', line 248

def converted_syntax
  base_syntax
end

#original_syntaxObject



241
242
243
244
245
246
# File 'lib/transpec/syntax/method_stub.rb', line 241

def original_syntax
  syntax = base_syntax
  syntax << '.any_number_of_times' if @method_stub.any_number_of_times?
  syntax << '.at_least(0)' if @method_stub.at_least_zero?
  syntax
end