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

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

Instance Method Summary collapse

Methods inherited from Record

#==, #hash, #to_s

Constructor Details

#initialize(method_stub) ⇒ NoMessageAllowanceRecord

Returns a new instance of NoMessageAllowanceRecord.



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

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

Instance Method Details

#converted_syntaxObject



252
253
254
# File 'lib/transpec/syntax/method_stub.rb', line 252

def converted_syntax
  base_syntax
end

#original_syntaxObject



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

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