Sha256: 83a2f0f47431fa47363757e5ce54a95ab6e3b9f5a6ae65689523344921ad90d7

Contents?: true

Size: 705 Bytes

Versions: 19

Compression:

Stored size: 705 Bytes

Contents

#!/usr/bin/env ruby
#
#  Created by Luke A. Kanies on 2007-0419.
#  Copyright (c) 2006. All rights reserved.

require File.dirname(__FILE__) + '/../../lib/puppettest'

require 'puppettest'
require 'puppettest/parsertesting'

class TestVariable < Test::Unit::TestCase
  include PuppetTest
  include PuppetTest::ParserTesting
  AST = Puppet::Parser::AST

  def setup
    super
    @scope = mkscope
    @name = "myvar"
    @var = AST::Variable.new(:value => @name)
  end

  def test_evaluate
    assert_equal(:undef, @var.evaluate(@scope), "did not return :undef on unset var")
    @scope.setvar(@name, "something")
    assert_equal("something", @var.evaluate(@scope), "incorrect variable value")
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
puppet-2.6.18 test/language/ast/variable.rb
puppet-2.6.17 test/language/ast/variable.rb
puppet-2.6.16 test/language/ast/variable.rb
puppet-2.6.15 test/language/ast/variable.rb
puppet-2.6.14 test/language/ast/variable.rb
puppet-2.6.13 test/language/ast/variable.rb
puppet-2.6.12 test/language/ast/variable.rb
puppet-2.6.11 test/language/ast/variable.rb
puppet-2.6.10 test/language/ast/variable.rb
puppet-2.6.9 test/language/ast/variable.rb
puppet-2.6.8 test/language/ast/variable.rb
puppet-2.6.7 test/language/ast/variable.rb
puppet-2.6.6 test/language/ast/variable.rb
puppet-2.6.5 test/language/ast/variable.rb
puppet-2.6.4 test/language/ast/variable.rb
puppet-2.6.3 test/language/ast/variable.rb
puppet-2.6.2 test/language/ast/variable.rb
puppet-2.6.1 test/language/ast/variable.rb
puppet-2.6.0 test/language/ast/variable.rb