Sha256: b7abd006ca1a75625f378dd5338a5c13391661eff118883d04cedf0c96c20071
Contents?: true
Size: 1.17 KB
Versions: 33
Compression:
Stored size: 1.17 KB
Contents
$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib' require 'minitest/autorun' require_relative 'test_helper' require 'fileutils' class ChefPackageTest < MiniTest::Unit::TestCase include FileUtils def setup Opsk::Root.start ['generate_chef', 'foo', 'bar'] Dir.mkdir('foo-sandbox/cookbooks') FileUtils.touch('foo-sandbox/cookbooks/1') FileUtils.touch('foo-sandbox/Gemfile.lock') end def teardown rm_rf 'foo-sandbox' end def with_cwd(dir) Dir.chdir dir do yield end end def test_build with_cwd 'foo-sandbox' do Opsk::Root.start ['package'] end assert File.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1/Cheffile') assert File.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1/roles/foo.rb') assert File.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1/boot.sh') assert Dir.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1/cookbooks') assert Dir.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1/environments') assert File.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1/dna.json') assert File.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1/environments/dev.rb') assert File.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1.tar.gz') end end
Version data entries
33 entries across 33 versions & 1 rubygems