👮 string literals should be single-quoted

This commit is contained in:
Andy Meneely
2016-03-17 23:49:04 -04:00
parent 65a0fdfd47
commit 0cbcc0c683
14 changed files with 34 additions and 34 deletions
+9 -9
View File
@@ -24,40 +24,40 @@ describe Squib::Args::Typographer do
expect(t.process(%{"foo"})).to eq(%{\u201Cfoo\u201D})
end
it "quotes in the middle of the string" do
it 'quotes in the middle of the string' do
expect(t.process(%{hello "foo" world})).to eq(%{hello \u201Cfoo\u201D world})
end
it "single left quotes at the beginning" do
it 'single left quotes at the beginning' do
expect(t.process(%{'foo})).to eq(%{\u2018foo})
end
it "single right quotes at the end" do
it 'single right quotes at the end' do
expect(t.process(%{foo'})).to eq(%{foo\u2019})
end
it "single quotes in the middle" do
it 'single quotes in the middle' do
expect(t.process(%{a 'foo' bar})).to eq(%{a \u2018foo\u2019 bar})
end
it "handles apostraphes" do
it 'handles apostraphes' do
expect(t.process(%{can't})).to eq(%{can\u2019t})
end
it "single quotes inside double quotes" do
it 'single quotes inside double quotes' do
expect(t.process(%{"'I can't do that', he said"})).to eq(%{\u201C\u2018I can\u2019t do that\u2019, he said\u201D})
end
it "replaces the straightforward ones" do
it 'replaces the straightforward ones' do
expect(t.process(%{``hi...'' -- ---})).to eq(%{\u201Chi\u2026\u201D \u2013 \u2014})
end
it "does nothing on lone quotes" do
it 'does nothing on lone quotes' do
expect(t.process(%{"})).to eq(%{"})
expect(t.process(%{'})).to eq(%{'})
end
it "ignores stuff in <tags>" do
it 'ignores stuff in <tags>' do
expect(t.process(%{<span weight="bold">"can't"</span>})).to eq(%{<span weight="bold">\u201Ccan\u2019t\u201D</span>})
end