Class: Transpec::Syntax::MethodStub::NoMessageAllowanceRecordBuilder

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

Instance Method Summary collapse

Methods inherited from RecordBuilder

build, #build, param_names

Instance Method Details

#base_syntaxObject



232
233
234
# File 'lib/transpec/syntax/method_stub.rb', line 232

def base_syntax
  "obj.#{method_stub.method_name}(:message)"
end

#new_syntaxObject



228
229
230
# File 'lib/transpec/syntax/method_stub.rb', line 228

def new_syntax
  base_syntax
end

#old_syntaxObject



221
222
223
224
225
226
# File 'lib/transpec/syntax/method_stub.rb', line 221

def old_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