summaryrefslogtreecommitdiffstats
path: root/spec/integration
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/application/doc_spec.rb1
-rwxr-xr-xspec/integration/parser/parser_spec.rb7
-rwxr-xr-xspec/integration/type/file_spec.rb61
3 files changed, 40 insertions, 29 deletions
diff --git a/spec/integration/application/doc_spec.rb b/spec/integration/application/doc_spec.rb
index f0b9d7db0..d94b3043b 100644
--- a/spec/integration/application/doc_spec.rb
+++ b/spec/integration/application/doc_spec.rb
@@ -7,6 +7,7 @@ describe Puppet::Application::Doc do
include PuppetSpec::Files
it "should not generate an error when module dir overlaps parent of site.pp (#4798)" do
+ pending "need to fix as part of fixing Brice's rdoc patch"
begin
# Note: the directory structure below is more complex than it
# needs to be, but it's representative of the directory structure
diff --git a/spec/integration/parser/parser_spec.rb b/spec/integration/parser/parser_spec.rb
index ec084b441..b7dfcc3e0 100755
--- a/spec/integration/parser/parser_spec.rb
+++ b/spec/integration/parser/parser_spec.rb
@@ -111,5 +111,12 @@ describe Puppet::Parser::Parser do
it "should correctly set the arrow type of a relationship" do
"Notify[foo] <~ Notify[bar]".should parse_with { |rel| rel.arrow == "<~" }
end
+
+ it "should be able to parse deep hash access" do
+ %q{
+ $hash = { 'a' => { 'b' => { 'c' => 'it works' } } }
+ $out = $hash['a']['b']['c']
+ }.should parse_with { |v| v.value.is_a?(Puppet::Parser::AST::ASTHash) }
+ end
end
end
diff --git a/spec/integration/type/file_spec.rb b/spec/integration/type/file_spec.rb
index c2702ee7a..46900a0f1 100755
--- a/spec/integration/type/file_spec.rb
+++ b/spec/integration/type/file_spec.rb
@@ -173,7 +173,12 @@ describe Puppet::Type.type(:file) do
it "should be able to recurse over a nonexistent file" do
@path = tmpfile("file_integration_tests")
- @file = Puppet::Type::File.new(:name => @path, :mode => 0644, :recurse => true, :backup => false)
+ @file = Puppet::Type::File.new(
+ :name => @path,
+ :mode => 0644,
+ :recurse => true,
+ :backup => false
+ )
@catalog = Puppet::Resource::Catalog.new
@catalog.add_resource @file
@@ -186,7 +191,12 @@ describe Puppet::Type.type(:file) do
build_path(@path)
- @file = Puppet::Type::File.new(:name => @path, :mode => 0644, :recurse => true, :backup => false)
+ @file = Puppet::Type::File.new(
+ :name => @path,
+ :mode => 0644,
+ :recurse => true,
+ :backup => false
+ )
@catalog = Puppet::Resource::Catalog.new
@catalog.add_resource @file
@@ -393,10 +403,8 @@ describe Puppet::Type.type(:file) do
dest = tmpfile("files_with_content")
- file = Puppet::Type.type(:file).new(
-
- :name => dest,
-
+ file = Puppet::Type.type(:file).new(
+ :name => dest,
:content => "this is some content, yo"
)
@@ -411,11 +419,9 @@ describe Puppet::Type.type(:file) do
dest = tmpfile("files_with_content")
- file = Puppet::Type.type(:file).new(
-
- :name => dest,
- :ensure => "file",
-
+ file = Puppet::Type.type(:file).new(
+ :name => dest,
+ :ensure => "file",
:content => "this is some content, yo"
)
@@ -433,12 +439,10 @@ describe Puppet::Type.type(:file) do
File.open(dest, "w") { |f| f.puts "boo" }
- file = Puppet::Type.type(:file).new(
-
- :name => dest,
+ file = Puppet::Type.type(:file).new(
+ :name => dest,
:ensure => :absent,
:source => source,
-
:backup => false
)
@@ -465,24 +469,23 @@ describe Puppet::Type.type(:file) do
File.open(@purgee, "w") { |f| f.puts "footest" }
- @lfobj = Puppet::Type.newfile(
-
- :title => "localfile",
- :path => @localfile,
+ @lfobj = Puppet::Type.newfile(
+ :title => "localfile",
+ :path => @localfile,
:content => "rahtest\n",
- :ensure => :file,
-
- :backup => false
+ :ensure => :file,
+ :backup => false
)
- @destobj = Puppet::Type.newfile(
- :title => "destdir", :path => @destdir,
- :source => @sourcedir,
- :backup => false,
- :purge => true,
-
- :recurse => true)
+ @destobj = Puppet::Type.newfile(
+ :title => "destdir",
+ :path => @destdir,
+ :source => @sourcedir,
+ :backup => false,
+ :purge => true,
+ :recurse => true
+ )
@catalog = Puppet::Resource::Catalog.new
@catalog.add_resource @lfobj, @destobj