Class: Transpec::Syntax::ShouldReceive::StubRecordBuilder
Instance Method Summary
collapse
build, #build, param_names
Instance Method Details
#new_syntax ⇒ Object
220
221
222
|
# File 'lib/transpec/syntax/should_receive.rb', line 220
def new_syntax
'obj.stub(:message)'
end
|
#old_syntax ⇒ Object
213
214
215
216
217
218
|
# File 'lib/transpec/syntax/should_receive.rb', line 213
def old_syntax
syntax = "obj.#{should_receive.method_name}(:message)"
syntax << '.any_number_of_times' if should_receive.any_number_of_times?
syntax << '.at_least(0)' if should_receive.at_least_zero?
syntax
end
|