Sha256: 7ecc429954513581701e5653727d245104ea71b76ccd7a6229df0288545d7f3e

Contents?: true

Size: 682 Bytes

Versions: 1

Compression:

Stored size: 682 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/scripts/run.sh')

   assert File.exists?('foo-sandbox/pkg/foo-sandbox-0.0.1.tar.gz')
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
opskeleton-0.1.2 test/package_test.rb