From cf75168dc2f95a530dffb7971733a0db2ef70ba2 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 8 Nov 2007 15:54:14 -0600 Subject: Classes once again get evaluated immediately when the 'include' function is used, instead of being lazy-evaluated. Previous work caused resources to get created to model these classes, but in the process, I removed the fact that the classes were evaluated immediately. This meant that you couldn't guarantee that a class was evaluated before you went to use its variables. --- test/lib/puppettest.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/lib') diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb index eb50077b8..a9ca6d472 100755 --- a/test/lib/puppettest.rb +++ b/test/lib/puppettest.rb @@ -195,6 +195,8 @@ module PuppetTest end Puppet[:ignoreschedules] = true + + @start = Time.now end def tempfile @@ -244,6 +246,8 @@ module PuppetTest end def teardown + @stop = Time.now + File.open("/tmp/test_times.log", ::File::WRONLY|::File::CREAT|::File::APPEND) { |f| f.puts "%0.4f %s %s" % [@stop - @start, @method_name, self.class] } @@cleaners.each { |cleaner| cleaner.call() } @@tmpfiles.each { |file| -- cgit