Fix RSpec/ContextWording cop (#24739)
This commit is contained in:
@@ -14,7 +14,7 @@ RSpec.describe EmojiFormatter do
|
||||
|
||||
let(:emojis) { [emoji] }
|
||||
|
||||
context 'given text that is not marked as html-safe' do
|
||||
context 'when given text that is not marked as html-safe' do
|
||||
let(:text) { 'Foo' }
|
||||
|
||||
it 'raises an argument error' do
|
||||
@@ -22,7 +22,7 @@ RSpec.describe EmojiFormatter do
|
||||
end
|
||||
end
|
||||
|
||||
context 'given text with an emoji shortcode at the start' do
|
||||
context 'when given text with an emoji shortcode at the start' do
|
||||
let(:text) { preformat_text(':coolcat: Beep boop') }
|
||||
|
||||
it 'converts the shortcode to an image tag' do
|
||||
@@ -30,7 +30,7 @@ RSpec.describe EmojiFormatter do
|
||||
end
|
||||
end
|
||||
|
||||
context 'given text with an emoji shortcode in the middle' do
|
||||
context 'when given text with an emoji shortcode in the middle' do
|
||||
let(:text) { preformat_text('Beep :coolcat: boop') }
|
||||
|
||||
it 'converts the shortcode to an image tag' do
|
||||
@@ -38,7 +38,7 @@ RSpec.describe EmojiFormatter do
|
||||
end
|
||||
end
|
||||
|
||||
context 'given text with concatenated emoji shortcodes' do
|
||||
context 'when given text with concatenated emoji shortcodes' do
|
||||
let(:text) { preformat_text(':coolcat::coolcat:') }
|
||||
|
||||
it 'does not touch the shortcodes' do
|
||||
@@ -46,7 +46,7 @@ RSpec.describe EmojiFormatter do
|
||||
end
|
||||
end
|
||||
|
||||
context 'given text with an emoji shortcode at the end' do
|
||||
context 'when given text with an emoji shortcode at the end' do
|
||||
let(:text) { preformat_text('Beep boop :coolcat:') }
|
||||
|
||||
it 'converts the shortcode to an image tag' do
|
||||
|
Reference in New Issue
Block a user