Sha256: a507918498a46a5a7830988198faf9ba7767c7a03a238b8e4dbfacfdeab50051
Contents?: true
Size: 745 Bytes
Versions: 16
Compression:
Stored size: 745 Bytes
Contents
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../lib/puppettest' require 'puppet' require 'puppettest' class TestPuppetUtilExecution < Test::Unit::TestCase include PuppetTest def test_withenv ENV["testing"] = "yay" assert_nothing_raised do Puppet::Util::Execution.withenv :testing => "foo" do $ran = ENV["testing"] end end assert_equal("yay", ENV["testing"]) assert_equal("foo", $ran) ENV["rah"] = "yay" assert_raise(ArgumentError) do Puppet::Util::Execution.withenv :testing => "foo" do raise ArgumentError, "yay" end end assert_equal("yay", ENV["rah"]) end end
Version data entries
16 entries across 16 versions & 1 rubygems