DEV: Use proper wording for contexts in specs

This commit is contained in:
Loïc Guitaut
2022-07-27 18:14:14 +02:00
committed by Loïc Guitaut
parent 02987e05d5
commit 3eaac56797
337 changed files with 2172 additions and 2723 deletions

View File

@ -3,7 +3,6 @@
require 'cache'
RSpec.describe Gaps do
it 'returns no gaps for empty data' do
expect(Gaps.new(nil, nil)).to be_blank
end
@ -16,7 +15,7 @@ RSpec.describe Gaps do
expect(Gaps.new([1, 2, 3], [1, 2, 3])).to be_blank
end
context "single element gap" do
describe "single element gap" do
let(:gap) { Gaps.new([1, 3], [1, 2, 3]) }
it 'has a gap for post 3' do
@ -26,7 +25,7 @@ RSpec.describe Gaps do
end
end
context "larger gap" do
describe "larger gap" do
let(:gap) { Gaps.new([1, 2, 3, 6, 7], [1, 2, 3, 4, 5, 6, 7]) }
it 'has a gap for post 6' do
@ -36,7 +35,7 @@ RSpec.describe Gaps do
end
end
context "multiple gaps" do
describe "multiple gaps" do
let(:gap) { Gaps.new([1, 5, 6, 7, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) }
it 'has both gaps' do
@ -47,7 +46,7 @@ RSpec.describe Gaps do
end
end
context "a gap in the beginning" do
describe "a gap in the beginning" do
let(:gap) { Gaps.new([2, 3, 4], [1, 2, 3, 4]) }
it 'has the gap' do
@ -57,7 +56,7 @@ RSpec.describe Gaps do
end
end
context "a gap in the ending" do
describe "a gap in the ending" do
let(:gap) { Gaps.new([1, 2, 3], [1, 2, 3, 4]) }
it 'has the gap' do
@ -67,7 +66,7 @@ RSpec.describe Gaps do
end
end
context "a large gap in the ending" do
describe "a large gap in the ending" do
let(:gap) { Gaps.new([1, 2, 3], [1, 2, 3, 4, 5, 6]) }
it 'has the gap' do
@ -76,5 +75,4 @@ RSpec.describe Gaps do
expect(gap.after[3]).to eq([4, 5, 6])
end
end
end