Sha256: d8485648656d21fe5f12126401434b28a1c938a889ad02a99b49b79209162436
Contents?: true
Size: 497 Bytes
Versions: 7
Compression:
Stored size: 497 Bytes
Contents
require 'spec_helper' describe Parslet::Atoms::Repetition do include Parslet describe "repeat" do let(:parslet) { str('a') } describe "(min, max)" do subject { parslet.repeat(1,2) } it { should_not parse("") } it { should parse("a") } it { should parse("aa") } end describe "0 times" do it "raises an ArgumentError" do expect { parslet.repeat(0,0) }.to raise_error(ArgumentError) end end end end
Version data entries
7 entries across 7 versions & 2 rubygems