Sha256: 28b5b536a53a2ec8291751b0dafcca879ae383e84a40b1a18f13e677aa2aa97e

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'

describe "basic parsing" do
  include TestParserGenerator

  it "test_many" do
    BabelBridge::Parser.many(";").hash.should == {:many=>";",:match=>true}
  end

  it "test_many?" do
    BabelBridge::Parser.many?(";").hash.should == {:many=>";", :optionally=>true, :match=>true}
  end

  it "test_many!" do
    BabelBridge::Parser.many!(";").hash.should == {:many=>";", :dont=>true, :match=>true}
  end

  it "test_match" do
    BabelBridge::Parser.match(";").hash.should == {:match=>";"}
  end

  it "test_match?" do
    BabelBridge::Parser.match?(";").hash.should == {:match=>";",:optionally=>true}
  end

  it "test_match!" do
    BabelBridge::Parser.match!(";").hash.should == {:match=>";",:dont=>true}
  end

  it "test_dont" do
    BabelBridge::Parser.dont.match(";").hash.should == {:match=>";",:dont=>true}
  end

  it "test_optionally" do
    BabelBridge::Parser.optionally.match(";").hash.should == {:match=>";",:optionally=>true}
  end

  it "test_could" do
    BabelBridge::Parser.could.match(";").hash.should == {:match=>";",:could=>true}
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
babel_bridge-0.5.1 spec/pattern_generators_spec.rb
babel_bridge-0.5.0 spec/pattern_generators_spec.rb