shard-ameba/spec/ameba/ast_traverse_spec.cr

19 lines
405 B
Crystal
Raw Normal View History

2017-10-31 23:06:47 +00:00
require "../spec_helper"
module Ameba
rule = DummyRule.new
source = Source.new ""
describe "AST Traverse" do
{% for name in NODE_VISITORS %}
describe "{{name}}" do
it "allow to visit {{name}} node" do
visitor = {{name}}Visitor.new rule, source
nodes = Crystal::Parser.new("").parse
nodes.accept visitor
end
end
{% end %}
end
end