👮 string literals should be single-quoted
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user