Merge pull request #161 from hunner/fix_lets

Lets can't be used outside of a test context
This commit is contained in:
Hunter Haugen 2014-02-27 15:50:42 -08:00
commit 6c50f50aa0
9 changed files with 10 additions and 30 deletions

View file

@ -1,9 +1,7 @@
require 'spec_helper_acceptance'
describe 'concat backup parameter' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
context '=> puppet' do
before :all do
shell("rm -rf #{basedir}")

View file

@ -13,9 +13,7 @@ else
end
describe 'basic concat test' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
shared_examples 'successfully_applied' do |pp|
it 'applies the manifest twice with no stderr' do

View file

@ -1,9 +1,7 @@
require 'spec_helper_acceptance'
describe 'concat force empty parameter' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
context 'should run successfully' do
pp = <<-EOS
include concat::setup

View file

@ -13,9 +13,7 @@ else
end
describe 'concat::fragment source' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
context 'should read file fragments from local system' do
before(:all) do
shell("/bin/echo 'file1 contents' > #{basedir}/file1")

View file

@ -1,9 +1,7 @@
require 'spec_helper_acceptance'
describe 'concat ensure_newline parameter' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
context '=> false' do
pp = <<-EOS
include concat::setup

View file

@ -1,9 +1,7 @@
require 'spec_helper_acceptance'
describe 'concat order' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
before(:all) do
shell("rm -rf #{basedir} #{default.puppet['vardir']}/concat")
shell("mkdir -p #{basedir}")
@ -79,9 +77,7 @@ describe 'concat order' do
end # concat order
describe 'concat::fragment order' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
before(:all) do
shell("rm -rf #{basedir} #{default.puppet['vardir']}/concat")
shell("mkdir -p #{basedir}")

View file

@ -1,9 +1,7 @@
require 'spec_helper_acceptance'
describe 'replacement of' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
context 'file' do
context 'should not succeed' do
before(:all) do

View file

@ -1,9 +1,7 @@
require 'spec_helper_acceptance'
describe 'symbolic name' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
pp = <<-EOS
include concat::setup
concat { 'not_abs_path':

View file

@ -1,9 +1,7 @@
require 'spec_helper_acceptance'
describe 'concat warn =>' do
let :basedir do
default.tmpdir('concat')
end
basedir = default.tmpdir('concat')
context 'true should enable default warning message' do
pp = <<-EOS
include concat::setup