diff --git a/Rakefile b/Rakefile index fa3dcb1..0c42119 100644 --- a/Rakefile +++ b/Rakefile @@ -24,12 +24,13 @@ task :acceptance do target = ENV['platform'] if ! target STDERR.puts 'TEST_TARGET environment variable is not set' - STDERR.puts 'setting to default value of "centos7-64ma."' - target = 'centos7-64ma.' + STDERR.puts 'setting to default value of "centos7-64ma".' + target = 'centos7-64ma' + ENV['platform'] = target end cli = BeakerHostGenerator::CLI.new([target]) - nodeset_dir = 'acceptance/nodesets' + nodeset_dir = 'spec/acceptance/nodesets' nodeset = "#{nodeset_dir}/#{target}.yml" FileUtils.mkdir_p(nodeset_dir) File.open(nodeset, 'w') do |fh| @@ -37,8 +38,8 @@ task :acceptance do end puts nodeset sh 'gem build puppet-strings.gemspec' - sh 'puppet module build acceptance/fixtures/modules/test' - sh "BEAKER_set=#{ENV['platform']} rspec acceptance/*.rb" + sh 'puppet module build spec/fixtures/acceptance/modules/test' + sh "BEAKER_set=#{ENV['platform']} rspec spec/acceptance/*.rb" end task(:rubocop) do diff --git a/acceptance/running_strings_generate.rb b/spec/acceptance/running_strings_generate.rb similarity index 97% rename from acceptance/running_strings_generate.rb rename to spec/acceptance/running_strings_generate.rb index fa13c63..a8c382e 100644 --- a/acceptance/running_strings_generate.rb +++ b/spec/acceptance/running_strings_generate.rb @@ -19,7 +19,7 @@ describe 'Generating module documentation using generate action' do end it 'should generate documentation for 3x functions' do - expect(read_file_on(master, '/root/doc/puppet_functions_ruby3x/function3x.html')).to include('This is the function documentation for function3x') + expect(read_file_on(master, '/root/doc/puppet_functions_ruby3x/function3x.html')).to include('This is the function documentation for function3x') end it 'should generate documentation for 4x functions' do diff --git a/acceptance/fixtures/modules/test/lib/puppet/functions/4x_function.rb b/spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb similarity index 100% rename from acceptance/fixtures/modules/test/lib/puppet/functions/4x_function.rb rename to spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb diff --git a/acceptance/fixtures/modules/test/lib/puppet/parser/functions/function3x.rb b/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb similarity index 53% rename from acceptance/fixtures/modules/test/lib/puppet/parser/functions/function3x.rb rename to spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb index e3083ea..12713cb 100644 --- a/acceptance/fixtures/modules/test/lib/puppet/parser/functions/function3x.rb +++ b/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb @@ -1,3 +1,2 @@ -Puppet::Parser::Functions.newfunction(:function3x, :doc => "This is the -function documentation for `function3x`") do |args| +Puppet::Parser::Functions.newfunction(:function3x, :doc => "This is the function documentation for `function3x`") do |args| end diff --git a/acceptance/fixtures/modules/test/manifests/init.pp b/spec/fixtures/acceptance/modules/test/manifests/init.pp similarity index 100% rename from acceptance/fixtures/modules/test/manifests/init.pp rename to spec/fixtures/acceptance/modules/test/manifests/init.pp diff --git a/acceptance/fixtures/modules/test/manifests/triple_nested_classes.pp b/spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp similarity index 100% rename from acceptance/fixtures/modules/test/manifests/triple_nested_classes.pp rename to spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp diff --git a/acceptance/fixtures/modules/test/metadata.json b/spec/fixtures/acceptance/modules/test/metadata.json similarity index 100% rename from acceptance/fixtures/modules/test/metadata.json rename to spec/fixtures/acceptance/modules/test/metadata.json diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index e64afc4..578fa3c 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -15,7 +15,7 @@ RSpec.configure do |c| scp_to(host, Dir.glob('puppet-strings*.gem').first, 'puppet-strings.gem') on host, 'gem install puppet-strings.gem' - scp_to(host, Dir.glob('acceptance/fixtures/modules/test/pkg/username-test*.gz').first, 'test.tar.gz') + scp_to(host, Dir.glob('spec/fixtures/acceptance/modules/test/pkg/username-test*.gz').first, 'test.tar.gz') on host, puppet('module', 'install', 'test.tar.gz') on host, 'gem install yard'