Sha256: 6d1d512cf262148e42af4d568d095c048ac9779827bb69b41418a240d266b349
Contents?: true
Size: 616 Bytes
Versions: 6
Compression:
Stored size: 616 Bytes
Contents
#! /usr/bin/env ruby -S rspec require 'spec_helper' describe "the parseyaml function" do let(:scope) { PuppetlabsSpec::PuppetInternals.scope } it "should exist" do expect(Puppet::Parser::Functions.function("parseyaml")).to eq("function_parseyaml") end it "should raise a ParseError if there is less than 1 arguments" do expect { scope.function_parseyaml([]) }.to( raise_error(Puppet::ParseError)) end it "should convert YAML to a data structure" do yaml = <<-EOS - aaa - bbb - ccc EOS result = scope.function_parseyaml([yaml]) expect(result).to(eq(['aaa','bbb','ccc'])) end end
Version data entries
6 entries across 6 versions & 1 rubygems