spec/rubocop/cop/style/semicolon_spec.rb in rubocop-0.15.0 vs spec/rubocop/cop/style/semicolon_spec.rb in rubocop-0.16.0

- old
+ new

@@ -1,6 +1,6 @@ - # encoding: utf-8 +# encoding: utf-8 require 'spec_helper' describe Rubocop::Cop::Style::Semicolon, :config do subject(:cop) { described_class.new(config) } @@ -80,21 +80,21 @@ ['string = ";', 'multi-line string"']) expect(cop.offences).to be_empty end - context 'when AllowAsExpressionSeparator is true' do - let(:cop_config) { { 'AllowAsExpressionSeparator' => true } } + context 'when AllowAsExpressionSeparator is true' do + let(:cop_config) { { 'AllowAsExpressionSeparator' => true } } - it 'accepts several expressions' do - inspect_source(cop, - ['puts "this is a test"; puts "So is this"']) - expect(cop.offences).to be_empty - end + it 'accepts several expressions' do + inspect_source(cop, + ['puts "this is a test"; puts "So is this"']) + expect(cop.offences).to be_empty + end - it 'accepts one line method with two statements' do - inspect_source(cop, - ['def foo(a) x(1); y(2); z(3); end']) - expect(cop.offences).to be_empty - end - end + it 'accepts one line method with two statements' do + inspect_source(cop, + ['def foo(a) x(1); y(2); z(3); end']) + expect(cop.offences).to be_empty + end + end end