class Transpec::Syntax::Its::RecordBuilder

Public Instance Methods

new_syntax() click to toggle source
# File lib/transpec/syntax/its.rb, line 194
def new_syntax
  if its.attribute_expression.brackets?
    "describe '[:key]' do subject { super()[:key] }; it { } end"
  else
    "describe '#attr' do subject { super().attr }; it { } end"
  end
end
old_syntax() click to toggle source
# File lib/transpec/syntax/its.rb, line 186
def old_syntax
  if its.attribute_expression.brackets?
    'its([:key]) { }'
  else
    'its(:attr) { }'
  end
end