Sha256: 630dae20ed545ff8a720858f791c5ca9e4956574f99140864aed1a319d77b3a3

Contents?: true

Size: 773 Bytes

Versions: 14

Compression:

Stored size: 773 Bytes

Contents

require 'spec_helper'
require 'r10k/deployment/environment'

describe R10K::Deployment::Environment do
  let(:remote) { 'git://github.com/adrienthebo/r10k-fixture-repo' }
  let(:ref)    { 'master' }

  describe 'dirname' do
    it 'uses the ref as the default dirname' do
      subject = described_class.new(ref, remote, '/tmp')
      subject.dirname.should == 'master'
    end

    it 'uses the ref and a provided source name in the default dirname' do
      subject = described_class.new(ref, remote, '/tmp', nil, "the")
      subject.dirname.should == 'the_master'
    end

    it 'allows a specific dirname to be set' do
      subject = described_class.new(ref, remote, '/tmp', 'sourcename_master')
      subject.dirname.should == 'sourcename_master'
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
r10k-1.2.4 spec/unit/deployment/environment_spec.rb
r10k-1.2.3 spec/unit/deployment/environment_spec.rb
r10k-1.2.2 spec/unit/deployment/environment_spec.rb
r10k-1.2.1 spec/unit/deployment/environment_spec.rb
r10k-1.2.0 spec/unit/deployment/environment_spec.rb
r10k-1.2.0rc2 spec/unit/deployment/environment_spec.rb
r10k-1.1.4 spec/unit/deployment/environment_spec.rb
r10k-1.2.0rc1 spec/unit/deployment/environment_spec.rb
r10k-1.1.3 spec/unit/deployment/environment_spec.rb
r10k-1.1.2 spec/unit/deployment/environment_spec.rb
r10k-1.1.1 spec/unit/deployment/environment_spec.rb
r10k-1.1.1rc1 spec/unit/deployment/environment_spec.rb
r10k-1.1.0 spec/unit/deployment/environment_spec.rb
r10k-1.1.0rc1 spec/unit/deployment/environment_spec.rb