summaryrefslogtreecommitdiffstats
path: root/spec/integration/parser
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2010-11-23 16:42:06 -0800
committerNick Lewis <nick@puppetlabs.com>2010-11-23 16:42:06 -0800
commit4b35402ba85d8842d757becec5c8a7bf4d6f6654 (patch)
tree5da174c4c1c106b99e8c464e45e89d7b5ba2b5a2 /spec/integration/parser
parenta7bd1630622cace01d0e4c974c76366e4b3b886c (diff)
parent2bc6727b6ac7348dbac98099f1fe0aeb3cd1295f (diff)
Merge branch 'next'
Diffstat (limited to 'spec/integration/parser')
-rw-r--r--spec/integration/parser/functions_spec.rb21
-rw-r--r--spec/integration/parser/ruby_manifest_spec.rb2
2 files changed, 22 insertions, 1 deletions
diff --git a/spec/integration/parser/functions_spec.rb b/spec/integration/parser/functions_spec.rb
new file mode 100644
index 000000000..cbfb4ac88
--- /dev/null
+++ b/spec/integration/parser/functions_spec.rb
@@ -0,0 +1,21 @@
+#!/usr/bin/env ruby
+
+require File.dirname(__FILE__) + '/../../spec_helper'
+
+describe Puppet::Parser::Functions do
+ before :each do
+ Puppet::Parser::Functions.rmfunction("template") if Puppet::Parser::Functions.function("template")
+ end
+
+ it "should support multiple threads autoloading the same function" do
+ threads = []
+ lambda {
+ 10.times { |a|
+ threads << Thread.new {
+ Puppet::Parser::Functions.function("template")
+ }
+ }
+ }.should_not raise_error
+ threads.each { |t| t.join }
+ end
+end \ No newline at end of file
diff --git a/spec/integration/parser/ruby_manifest_spec.rb b/spec/integration/parser/ruby_manifest_spec.rb
index af110d3b3..de6f4628c 100644
--- a/spec/integration/parser/ruby_manifest_spec.rb
+++ b/spec/integration/parser/ruby_manifest_spec.rb
@@ -69,7 +69,7 @@ describe "Pure ruby manifests" do
write_file('foo.rb', "hostclass 'bar' do file 'test_file', :owner => 'root', :mode => '644' end")
catalog = compile("import 'foo'\ninclude bar")
file = catalog.resource("File[test_file]")
- file.should be_a Puppet::Resource
+ file.should be_a(Puppet::Resource)
file.type.should == 'File'
file.title.should == 'test_file'
file.exported.should_not be