Sha256: 8b7d082b4702eff6420e52513034aecbfaf790b11ee46995d7c5375f26da2762
Contents?: true
Size: 648 Bytes
Versions: 6
Compression:
Stored size: 648 Bytes
Contents
require 'spec_helper' module Sexpr::Parser describe Citrus, "to_sexpr" do let(:parser){ Citrus.new(bool_expr_parser) } subject{ parser.to_sexpr(parser.parse("not x")) } it 'calls sexpr' do subject.should eq([:bool_not, [:var_ref, "x"]]) end it 'returns a Sexpr object' do subject.should be_a(Sexpr) end it 'tags the modules recursively' do subject.last.should be_a(Sexpr) end it 'sets the markers' do [subject, subject.last].each do |s| s.tracking_markers.should be_a(Hash) s.tracking_markers[:citrus_match].should_not be_nil end end end end
Version data entries
6 entries across 6 versions & 1 rubygems