diff options
| author | Josh Partlow <joshua.partlow@puppetlabs.com> | 2014-09-03 12:44:38 -0700 |
|---|---|---|
| committer | Josh Partlow <joshua.partlow@puppetlabs.com> | 2014-09-03 12:44:38 -0700 |
| commit | d02943ffc0d3fa6e12758ce272bb332e569725c6 (patch) | |
| tree | 77a911a75036c339ce49e4b44747d6544bfb03f3 /spec/unit/parser/functions/create_resources_spec.rb | |
| parent | b2c3dba204522dc243134b90e70117f8ee33b0e8 (diff) | |
| parent | 45b4945e5c5e79c85168c8a8c5583ea4a33ed50c (diff) | |
| download | puppet-d02943ffc0d3fa6e12758ce272bb332e569725c6.tar.gz | |
Merge remote-tracking branch 'upstream/master' into stable
* upstream/master: (767 commits)
(maint) Namespace constant declaration in specs to prevent warnings
(maint) Expect test to fail on windows ruby 2.0 x86
(PUP-3069) Fix path expansion for environment.conf test on Win
(PUP-2349) Add windows specific expectation for deprecation_warning
(PUP-2349) Add windows specific expectation for deprecation_warning
(PUP-3069) Clear configuration_file for tests
(PUP-3069) Test both future and current parser with default_manifest
(PUP-3069) Update default_manifest setting descriptions
(PUP-3069) Change restrict_environment_manifest name
(PUP-3163) Create and manage the mode of $reportsdir
(maint) Clear record of configured deprecated settings
(PUP-3069) Add an integration spec for default_manifest
(PUP-3069) Halt compile if environment has manifest conflict
(PUP-3069) Add spec test for new default options
(PUP-3069) Add default manifest settings
PUP-3155 Improve spec tests around the PE puppet version
(PUP-3153) Guard against nil when closing Uniquefiles
(PUP-2984) Remove old installation directory when going from x64 to x86
(PUP-1884) Migrate MSI deps into puppet repo
(PUP-3154) Create and manage the mode of $statedir on redhat
...
Diffstat (limited to 'spec/unit/parser/functions/create_resources_spec.rb')
| -rwxr-xr-x | spec/unit/parser/functions/create_resources_spec.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/unit/parser/functions/create_resources_spec.rb b/spec/unit/parser/functions/create_resources_spec.rb index 79ed02f22..3e7bd8015 100755 --- a/spec/unit/parser/functions/create_resources_spec.rb +++ b/spec/unit/parser/functions/create_resources_spec.rb @@ -49,7 +49,7 @@ describe 'function for dynamically creating resources' do end it 'should be able to add exported resources' do - catalog = compile_to_catalog("create_resources('@@file', {'/etc/foo'=>{'ensure'=>'present'}})") + catalog = compile_to_catalog("create_resources('@@file', {'/etc/foo'=>{'ensure'=>'present'}}) realize(File['/etc/foo'])") catalog.resource(:file, "/etc/foo")['ensure'].should == 'present' catalog.resource(:file, "/etc/foo").exported.should == true end @@ -202,5 +202,12 @@ describe 'function for dynamically creating resources' do catalog.resource(:notify, "test")['message'].should == 'two' catalog.resource(:class, "bar").should_not be_nil end + + it 'should fail with a correct error message if the syntax of an imported file is incorrect' do + expect{ + Puppet[:modulepath] = my_fixture_dir + compile_to_catalog('include foo') + }.to raise_error(Puppet::Error, /Syntax error at.*/) + end end end |
