lib/controlrepo/rake_tasks.rb in controlrepo-1.0.0 vs lib/controlrepo/rake_tasks.rb in controlrepo-1.1.0

- old
+ new

@@ -102,13 +102,14 @@ @config.write_gemfile(@repo.tempdir) # Deduplicate and write the tests (Spec and Acceptance) Controlrepo::Test.deduplicate(@config.tests).each do |test| @config.write_spec_test("#{@repo.tempdir}/spec/classes",test) - @config.write_acceptance_test("#{@repo.tempdir}/spec/acceptance",test) end + @config.write_acceptance_tests("#{@repo.tempdir}/spec/acceptance",Controlrepo::Test.deduplicate(@config.tests)) + # Parse the current hiera config, modify, and write it to the temp dir hiera_config = @repo.hiera_config hiera_config.each do |setting,value| if value.is_a?(Hash) if value.has_key?(:datadir) @@ -123,18 +124,32 @@ task :controlrepo_autotest_spec do Dir.chdir(@repo.tempdir) do #`bundle install --binstubs` #`bin/rake spec_standalone` - exec("bundle install --binstubs; bundle exec rake spec_standalone") + exec("bundle install --without acceptance; bundle exec rake spec_standalone") end - # TODO: Look at how this outputs and see if it needs to be improved end +task :controlrepo_autotest_acceptance do + Dir.chdir(@repo.tempdir) do + #`bundle install --binstubs` + #`bin/rake spec_standalone` + exec("bundle install; bundle exec rake acceptance") + end +end + task :controlrepo_spec => [ :controlrepo_autotest_prep, :controlrepo_autotest_spec ] + +task :controlrepo_acceptance => [ + :controlrepo_autotest_prep, + :controlrepo_autotest_acceptance + ] + + task :r10k_deploy_local do require 'controlrepo/testconfig' @repo = Controlrepo.new @config = Controlrepo::TestConfig.new("#{repo.spec_dir}/controlrepo.yaml")