diff options
| -rw-r--r-- | test/other/tc_fact.rb | 35 | ||||
| -rw-r--r-- | test/other/tc_function.rb | 29 |
2 files changed, 0 insertions, 64 deletions
diff --git a/test/other/tc_fact.rb b/test/other/tc_fact.rb deleted file mode 100644 index 34f053dc0..000000000 --- a/test/other/tc_fact.rb +++ /dev/null @@ -1,35 +0,0 @@ -if __FILE__ == $0 - $:.unshift '..' - $:.unshift '../../lib' - $puppetbase = "../../../../language/trunk/" -end - -require 'puppet/fact' -require 'facter' -require 'test/unit' - -# $Id$ - -class TestFacts < Test::Unit::TestCase - def test_newfact - Puppet[:debug] = true if __FILE__ == $0 - fact = nil - assert_nothing_raised() { - fact = Puppet::Fact.new( - :name => "funtest", - :code => "echo funtest", - :interpreter => "/bin/sh" - ) - } - assert_equal( - "funtest", - Puppet::Fact["funtest"] - ) - end - - def test_os - assert_equal(Facter["operatingsystem"].value, - Puppet::Fact["operatingsystem"] - ) - end -end diff --git a/test/other/tc_function.rb b/test/other/tc_function.rb deleted file mode 100644 index e35abddd6..000000000 --- a/test/other/tc_function.rb +++ /dev/null @@ -1,29 +0,0 @@ -if __FILE__ == $0 - $:.unshift '..' - $:.unshift '../../lib' - $puppetbase = "../../../../language/trunk" -end - -require 'puppet/function' -require 'puppet/fact' -require 'test/unit' - -# $Id$ - -class TestFunctions < Test::Unit::TestCase - def test_retrieve - vars = %w{operatingsystem operatingsystemrelease} - - vars.each { |var| - value = nil - assert_nothing_raised() { - value = Puppet::Function["fact"].call(var) - } - - assert_equal( - Puppet::Fact[var], - value - ) - } - end -end |
