From 3b2521b3cc3b647c7c421bf1d93d5967234e8676 Mon Sep 17 00:00:00 2001 From: luke Date: Mon, 1 Jan 2007 21:08:45 +0000 Subject: Fixing graphing tests, and correctly only using storeconfigs in tests where rails is available git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2009 980ebf18-57e1-0310-9a29-db15c13687c0 --- test/language/parser.rb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'test/language') diff --git a/test/language/parser.rb b/test/language/parser.rb index e2e38ace3..bb07d55e8 100755 --- a/test/language/parser.rb +++ b/test/language/parser.rb @@ -266,7 +266,6 @@ class TestParser < Test::Unit::TestCase # Verify that we can parse collections def test_collecting - Puppet[:storeconfigs] = true text = "Port <| |>" parser = mkparser parser.string = text @@ -427,8 +426,13 @@ file { "/tmp/yayness": # Make sure virtual and exported resources work appropriately. def test_virtualresources - Puppet[:storeconfigs] = true - [:virtual, :exported].each do |form| + tests = [:virtual] + if Puppet.features.rails? + Puppet[:storeconfigs] = true + tests << :exported + end + + tests.each do |form| parser = mkparser if form == :virtual @@ -495,8 +499,13 @@ file { "/tmp/yayness": end def test_collections - Puppet[:storeconfigs] = true - [:virtual, :exported].each do |form| + tests = [:virtual] + if Puppet.features.rails? + Puppet[:storeconfigs] = true + tests << :exported + end + + tests.each do |form| parser = mkparser if form == :virtual -- cgit