Sha256: 50ae04cee6f5fd637f9911052d52ce1ac4ed777b857b373774d90803ab24ce6f

Contents?: true

Size: 755 Bytes

Versions: 13

Compression:

Stored size: 755 Bytes

Contents

$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'

require 'minitest/autorun'
require_relative 'test_helper'
require 'fileutils'

class PackageTest < MiniTest::Unit::TestCase
  include FileUtils

  def setup
    Opsk::Root.start ['generate', 'foo', 'bar']
  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/foo-sandbox-0.0.1/Puppetfile')
   assert File.exists?('foo-sandbox/foo-sandbox-0.0.1/manifests/site.pp')
   assert File.exists?('foo-sandbox/foo-sandbox-0.0.1/scripts/run.sh')
   assert File.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1.tar.gz')
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
opskeleton-0.3.3 test/package_test.rb
opskeleton-0.3.2 test/package_test.rb
opskeleton-0.3.1 test/package_test.rb
opskeleton-0.3.0 test/package_test.rb
opskeleton-0.2.1 test/package_test.rb
opskeleton-0.2.0 test/package_test.rb
opskeleton-0.1.9 test/package_test.rb
opskeleton-0.1.8 test/package_test.rb
opskeleton-0.1.7 test/package_test.rb
opskeleton-0.1.6 test/package_test.rb
opskeleton-0.1.5 test/package_test.rb
opskeleton-0.1.4 test/package_test.rb
opskeleton-0.1.3 test/package_test.rb