Sha256: d1352d1d16cdc815a4d87428db8037d410e21a2be2cbe0b17df311b2e1c4d8de

Contents?: true

Size: 933 Bytes

Versions: 13

Compression:

Stored size: 933 Bytes

Contents

gem 'minitest'

require 'minitest/autorun'
require 'bib/opsworks/composer'

class ComposerTest < Minitest::Test
  def setup
    @fixtures_path ||= Pathname.new(File.expand_path('../tmp-fixtures/', __FILE__)).tap{|path|
      FileUtils.mkdir_p path.to_s
    }

    @release_path = Pathname.new(File.expand_path('releases/123/', @fixtures_path))
    FileUtils.mkdir_p @release_path
    FileUtils.mkdir_p Pathname.new(File.expand_path('current/vendor/some-lib', @fixtures_path))
  end

  def teardown
    FileUtils.rm_rf @fixtures_path
  end

  def test_composer_copy
    composervendor = Bib::Opsworks::Composer.new

    #do not use www-data, or the test will fail on systems without that user
    deploy_user = { 'user' => Process.uid, 'group' => Process.gid }

    composervendor.copy_vendor(@release_path, deploy_user)
    assert_equal(true,::File.exists?(File.expand_path('releases/123/vendor/some-lib',@fixtures_path)))
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
BibOpsworks-0.1.2 tests/composer_test.rb
BibOpsworks-0.1.1 tests/composer_test.rb
BibOpsworks-0.1 tests/composer_test.rb
BibOpsworks-0.0.9.3 tests/composer_test.rb
BibOpsworks-0.0.9.2 tests/composer_test.rb
BibOpsworks-0.0.9.1 tests/composer_test.rb
BibOpsworks-0.0.9 tests/composer_test.rb
BibOpsworks-0.0.8 tests/composer_test.rb
BibOpsworks-0.0.7 tests/composer_test.rb
BibOpsworks-0.0.6 tests/composer_test.rb
BibOpsworks-0.0.5 tests/composer_test.rb
BibOpsworks-0.0.4 tests/composer_test.rb
BibOpsworks-0.0.3 tests/composer_test.rb