diff options
Diffstat (limited to 'spec/spec_helper_acceptance.rb')
-rwxr-xr-x | spec/spec_helper_acceptance.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index 53c1661..ef99723 100755 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -12,7 +12,7 @@ unless ENV['RS_PROVISION'] == 'no' or ENV['BEAKER_provision'] == 'no' hosts.each do |host| on host, "mkdir -p #{host['distmoduledir']}" - on host, "/bin/touch #{default['puppetpath']}/hiera.yaml" + on host, "/bin/touch #{host['puppetpath']}/hiera.yaml" end end @@ -25,10 +25,15 @@ RSpec.configure do |c| # Configure all nodes in nodeset c.before :suite do + if ENV['FUTURE_PARSER'] == 'true' + default[:default_apply_opts] ||= {} + default[:default_apply_opts].merge!({:parser => 'future'}) + end hosts.each do |host| if host['platform'] !~ /windows/i copy_root_module_to(host, :source => proj_root, :module_name => 'stdlib') end + end hosts.each do |host| if host['platform'] =~ /windows/i @@ -37,3 +42,10 @@ RSpec.configure do |c| end end end + +def is_future_parser_enabled? + if default[:default_apply_opts] + return default[:default_apply_opts][:parser] == 'future' + end + return false +end |