main
 1RSpec.describe Mpeg::Repitition do
 2  context "with a min(1) and max(1)" do
 3    subject { Mpeg::Str.new('o').repeat(1, 2) }
 4
 5    specify { expect(subject.parse('o')).to be_truthy }
 6    specify { expect(subject.parse('oo')).to be_truthy }
 7    specify { expect(subject.parse('ooo')).to be_falsey }
 8    specify { expect(subject.parse('mo')).to be_falsey }
 9  end
10
11  context "when a min(1)" do
12    subject { Mpeg::Str.new('o').repeat(1) }
13
14    specify { expect(subject.parse('')).to be_falsey }
15    specify { expect(subject.parse('mo')).to be_falsey }
16    specify { expect(subject.parse('o')).to be_truthy }
17    specify { expect(subject.parse('oo')).to be_truthy }
18    specify { expect(subject.parse('ooo')).to be_truthy }
19  end
20end