Class: Transpec::Syntax::Its::RecordBuilder
Instance Method Summary
collapse
build, #build, param_names
Instance Method Details
#new_syntax ⇒ Object
194
195
196
197
198
199
200
|
# 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 ⇒ Object
186
187
188
189
190
191
192
|
# File 'lib/transpec/syntax/its.rb', line 186
def old_syntax
if its.attribute_expression.brackets?
'its([:key]) { }'
else
'its(:attr) { }'
end
end
|