Class: Transpec::Syntax::OnelinerShould::ExpectRecordBuilder

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

Instance Method Summary collapse

Methods inherited from RecordBuilder

build, #build, param_names

Instance Method Details

#new_syntaxObject



138
139
140
141
142
# File 'lib/transpec/syntax/oneliner_should.rb', line 138

def new_syntax
  syntax = 'it { is_expected.'
  syntax << (should.positive? ? 'to' : negative_form_of_to)
  syntax << ' ... }'
end

#old_syntaxObject



132
133
134
135
136
# File 'lib/transpec/syntax/oneliner_should.rb', line 132

def old_syntax
  syntax = 'it { should'
  syntax << '_not' unless should.positive?
  syntax << ' ... }'
end