Sha256: a98afaf2d276f4c2a6aaa4d5876b70b78e7653d6e328be64b504def628f067c4
Contents?: true
Size: 837 Bytes
Versions: 21
Compression:
Stored size: 837 Bytes
Contents
#! /usr/bin/env ruby require 'spec_helper' require 'puppet/pops' require_relative './parser_rspec_helper' describe "egrammar parsing of 'application'" do include ParserRspecHelper before(:each) do with_app_management(true) end after(:each) do with_app_management(false) end it "an empty body" do expect(dump(parse("application foo { }"))).to eq("(application foo () ())") end it "an empty body" do prog = <<-EPROG application foo { db { one: password => 'secret' } } EPROG expect(dump(parse(prog))).to eq( [ "(application foo () (block", " (resource db", " (one", " (password => 'secret')))", "))" ].join("\n")) end it "accepts parameters" do s = "application foo($p1 = 'yo', $p2) { }" expect(dump(parse(s))).to eq("(application foo ((= p1 'yo') p2) ())") end end
Version data entries
21 entries across 21 versions & 1 rubygems