summaryrefslogtreecommitdiff
path: root/spec/unit/pops/parser/parser_spec.rb
diff options
context:
space:
mode:
authorStig Sandbeck Mathisen <ssm@debian.org>2013-05-26 17:54:29 +0200
committerStig Sandbeck Mathisen <ssm@debian.org>2013-05-26 17:54:29 +0200
commit1a1e7395553ee2244cf3b9c75ac5ce84ebbc4775 (patch)
tree7072a41b5b20a4a134607052954310c69867ed7a /spec/unit/pops/parser/parser_spec.rb
parent99de0b815d9c05804ddda33d5baa94b23ce1c39e (diff)
parent025f00d05226e74a8ae68b2b16122b17a9746f2c (diff)
downloadpuppet-upstream/3.2.1.tar.gz
Imported Upstream version 3.2.1upstream/3.2.1
Diffstat (limited to 'spec/unit/pops/parser/parser_spec.rb')
-rw-r--r--spec/unit/pops/parser/parser_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/unit/pops/parser/parser_spec.rb b/spec/unit/pops/parser/parser_spec.rb
new file mode 100644
index 000000000..86d3d6dd0
--- /dev/null
+++ b/spec/unit/pops/parser/parser_spec.rb
@@ -0,0 +1,15 @@
+require 'spec_helper'
+require 'puppet/pops'
+
+describe Puppet::Pops::Parser::Parser do
+ it "should instantiate a parser" do
+ parser = Puppet::Pops::Parser::Parser.new()
+ parser.class.should == Puppet::Pops::Parser::Parser
+ end
+
+ it "should parse a code string and return a model" do
+ parser = Puppet::Pops::Parser::Parser.new()
+ model = parser.parse_string("$a = 10").current
+ model.class.should == Model::AssignmentExpression
+ end
+end