Sha256: ce16604a1c71d835a67231a366230e6098c2fb90855b0e2b808391c9b4e95b9d
Contents?: true
Size: 709 Bytes
Versions: 92
Compression:
Stored size: 709 Bytes
Contents
#! /usr/bin/env ruby require 'spec_helper' describe Puppet::Settings::TerminusSetting do let(:setting) { described_class.new(:settings => mock('settings'), :desc => "test") } describe "#munge" do it "converts strings to symbols" do setting.munge("string").should == :string end it "converts '' to nil" do setting.munge('').should be_nil end it "preserves symbols" do setting.munge(:symbol).should == :symbol end it "preserves nil" do setting.munge(nil).should be_nil end it "does not allow unknown types through" do expect { setting.munge(["not a terminus type"]) }.to raise_error Puppet::Settings::ValidationError end end end
Version data entries
92 entries across 92 versions & 2 rubygems