Sha256: 46f3113b54d18d1a11ba339c45e1fbf19885d995ee4de31a7d88f87b076983f7

Contents?: true

Size: 967 Bytes

Versions: 92

Compression:

Stored size: 967 Bytes

Contents

#! /usr/bin/env ruby
require 'spec_helper'
require 'puppet'
require 'puppet_spec/files'
require 'semver'

describe Puppet do
  include PuppetSpec::Files

  context "#version" do
    it "should be valid semver" do
      SemVer.should be_valid Puppet.version
    end
  end

  Puppet::Util::Log.eachlevel do |level|
    it "should have a method for sending '#{level}' logs" do
      Puppet.should respond_to(level)
    end
  end

  it "should be able to change the path" do
    newpath = ENV["PATH"] + File::PATH_SEPARATOR + "/something/else"
    Puppet[:path] = newpath
    ENV["PATH"].should == newpath
  end

  it "should change $LOAD_PATH when :libdir changes" do
    one = tmpdir('load-path-one')
    two = tmpdir('load-path-two')
    one.should_not == two

    Puppet[:libdir] = one
    $LOAD_PATH.should include one
    $LOAD_PATH.should_not include two

    Puppet[:libdir] = two
    $LOAD_PATH.should_not include one
    $LOAD_PATH.should include two
  end
end

Version data entries

92 entries across 92 versions & 2 rubygems

Version Path
puppet-3.8.7 spec/unit/puppet_spec.rb
puppet-3.8.7-x86-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.7-x64-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.6 spec/unit/puppet_spec.rb
puppet-3.8.6-x86-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.6-x64-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.5 spec/unit/puppet_spec.rb
puppet-3.8.5-x86-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.5-x64-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.4 spec/unit/puppet_spec.rb
puppet-3.8.4-x86-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.4-x64-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.3 spec/unit/puppet_spec.rb
puppet-3.8.3-x86-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.3-x64-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.2 spec/unit/puppet_spec.rb
puppet-3.8.2-x86-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.2-x64-mingw32 spec/unit/puppet_spec.rb
puppet-3.8.1 spec/unit/puppet_spec.rb
puppet-3.8.1-x86-mingw32 spec/unit/puppet_spec.rb