summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/language/ast.rb4
-rwxr-xr-xtest/language/interpreter.rb4
-rwxr-xr-xtest/language/scope.rb4
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