2014-05-07 11:49:25 +02:00
|
|
|
#! /usr/bin/env ruby -S rspec
|
2014-03-12 19:22:23 +01:00
|
|
|
require 'beaker-rspec'
|
2015-07-10 02:11:10 +02:00
|
|
|
require 'beaker/puppet_install_helper'
|
2014-03-12 19:22:23 +01:00
|
|
|
|
|
|
|
UNSUPPORTED_PLATFORMS = []
|
|
|
|
|
2015-07-10 02:11:10 +02:00
|
|
|
run_puppet_install_helper
|
2014-03-12 19:22:23 +01:00
|
|
|
|
|
|
|
RSpec.configure do |c|
|
|
|
|
# Project root
|
|
|
|
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
|
|
|
|
|
|
|
# Readable test descriptions
|
|
|
|
c.formatter = :documentation
|
|
|
|
|
|
|
|
# Configure all nodes in nodeset
|
|
|
|
c.before :suite do
|
2015-04-09 16:56:43 +02:00
|
|
|
if ENV['FUTURE_PARSER'] == 'yes'
|
2014-10-28 23:27:24 +01:00
|
|
|
default[:default_apply_opts] ||= {}
|
|
|
|
default[:default_apply_opts].merge!({:parser => 'future'})
|
|
|
|
end
|
|
|
|
|
2014-11-12 00:33:43 +01:00
|
|
|
copy_root_module_to(default, :source => proj_root, :module_name => 'stdlib')
|
2014-03-12 19:22:23 +01:00
|
|
|
end
|
|
|
|
end
|
2014-10-28 23:27:24 +01:00
|
|
|
|
|
|
|
def is_future_parser_enabled?
|
2015-06-19 23:29:42 +02:00
|
|
|
if default[:type] == 'aio'
|
|
|
|
return true
|
|
|
|
elsif default[:default_apply_opts]
|
2014-10-28 23:27:24 +01:00
|
|
|
return default[:default_apply_opts][:parser] == 'future'
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
end
|