spec/rubocop/cop/style/encoding_spec.rb in rubocop-0.28.0 vs spec/rubocop/cop/style/encoding_spec.rb in rubocop-0.29.0

- old
+ new

@@ -10,18 +10,18 @@ { 'EnforcedStyle' => 'when_needed' } end it 'registers no offense when no encoding present but only ASCII ' \ 'characters' do - inspect_source(cop, ['def foo() end']) + inspect_source(cop, 'def foo() end') expect(cop.offenses).to be_empty end it 'registers an offense when there is no encoding present but non ' \ 'ASCII characters' do - inspect_source(cop, ['def foo() \'ä\' end']) + inspect_source(cop, 'def foo() \'ä\' end') expect(cop.offenses.size).to eq(1) expect(cop.messages).to eq( ['Missing utf-8 encoding comment.']) end @@ -84,10 +84,10 @@ let(:cop_config) do { 'EnforcedStyle' => 'always' } end it 'registers an offense when no encoding present' do - inspect_source(cop, ['def foo() end']) + inspect_source(cop, 'def foo() end') expect(cop.offenses.size).to eq(1) expect(cop.messages).to eq( ['Missing utf-8 encoding comment.']) end