diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-15 19:16:34 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-05-15 19:16:34 +0000 |
commit | 122e2bc780e2b135c8d95ce28be74eac5a6e3fd2 (patch) | |
tree | 96f29e58a75216c4454e0f91b789715ca7c0db01 | |
parent | 8f14c3f3f30926869dac798b5a03351fca55b1df (diff) | |
download | puppet-122e2bc780e2b135c8d95ce28be74eac5a6e3fd2.tar.gz puppet-122e2bc780e2b135c8d95ce28be74eac5a6e3fd2.tar.xz puppet-122e2bc780e2b135c8d95ce28be74eac5a6e3fd2.zip |
only performing collection tests if activerecord is available
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1197 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-x | test/language/ast.rb | 4 | ||||
-rwxr-xr-x | test/language/interpreter.rb | 4 | ||||
-rwxr-xr-x | test/language/scope.rb | 4 |
3 files changed, 12 insertions, 0 deletions
diff --git a/test/language/ast.rb b/test/language/ast.rb index cb95fdff4..7dc8d80d3 100755 --- a/test/language/ast.rb +++ b/test/language/ast.rb @@ -753,6 +753,7 @@ class TestAST < Test::Unit::TestCase end end + if defined? ActiveRecord # Verify that our collection stuff works. def test_collection collectable = [] @@ -808,6 +809,9 @@ class TestAST < Test::Unit::TestCase assert(objects.length > 0, "Did not receive any collected objects") end + else + $stderr.puts "No ActiveRecord -- skipping collection tests" + end # To fix #140. Currently non-functional. def disabled_test_classreuse diff --git a/test/language/interpreter.rb b/test/language/interpreter.rb index 8603e7f1c..1dbeb3ada 100755 --- a/test/language/interpreter.rb +++ b/test/language/interpreter.rb @@ -72,6 +72,7 @@ class TestInterpreter < Test::Unit::TestCase assert(config != newconfig, "Configs are somehow the same") end + if defined? ActiveRecord def test_hoststorage assert_nothing_raised { Puppet[:storeconfigs] = true @@ -102,6 +103,9 @@ class TestInterpreter < Test::Unit::TestCase obj = Puppet::Rails::Host.find_by_name(facts["hostname"]) assert(obj, "Could not find host object") end + else + $stderr.puts "No ActiveRecord -- skipping collection tests" + end if Facter["domain"].value == "madstop.com" begin diff --git a/test/language/scope.rb b/test/language/scope.rb index 9418a93b1..be95808db 100755 --- a/test/language/scope.rb +++ b/test/language/scope.rb @@ -665,6 +665,7 @@ class TestScope < Test::Unit::TestCase end + if defined? ActiveRecord # Verify that we recursively mark as collectable the results of collectable # components. def test_collectablecomponents @@ -811,4 +812,7 @@ host <||>" objects = scope.evaluate(:ast => top) } end + else + $stderr.puts "No ActiveRecord -- skipping collection tests" + end end |