spec/rubocop/cops/style/string_literals_spec.rb in rubocop-0.10.0 vs spec/rubocop/cops/style/string_literals_spec.rb in rubocop-0.11.0

- old
+ new

@@ -41,9 +41,19 @@ 'copyright = "\u00A9"'] inspect_source(cop, src) expect(cop.offences).to be_empty end + it 'accepts " in a %w' do + inspect_source(cop, ['%w(")']) + expect(cop.offences).to be_empty + end + + it 'accepts \\\\\n in a string' do # this would be: "\\\n" + inspect_source(cop, ['"foo \\\\\n bar"']) + expect(cop.offences).to be_empty + end + it 'can handle double quotes within embedded expression' do src = ['"#{"A"}"'] inspect_source(cop, src) expect(cop.offences).to be_empty end