Sha256: dd160e67cfcfd61fcdd45410ae8ff7c8aa7f5dd033cd4bdfefcf1b3f726de7c6

Contents?: true

Size: 1.13 KB

Versions: 21

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

class Helpers ; include Shuttle::PathHelpers ; end

describe Shuttle::PathHelpers do
  let(:target) do
    Hashr.new(:deploy_to => '/tmp')
  end

  subject { Helpers.new }
  before  { subject.stub(:target).and_return(target) }

  describe '#deploy_path' do
    it 'returns application deployment path' do
      expect(subject.deploy_path).to eq '/tmp'
    end
  end

  describe '#shared_path' do
    it 'returns shared deployment path' do
      expect(subject.shared_path).to eq '/tmp/shared'
    end
  end

  describe '#release_path' do
    before { subject.stub(:version).and_return(1) }

    it 'returns current release path' do
      expect(subject.release_path).to eq '/tmp/releases/1'
    end
  end

  describe '#current_path' do
    it 'returns current linked release path' do
      expect(subject.current_path).to eq '/tmp/current'
    end
  end

  describe '#version_path' do
    it 'returns version file path' do
      expect(subject.version_path).to eq '/tmp/version'
    end
  end

  describe '#scm_path' do
    it 'returns project repository path' do
      expect(subject.scm_path).to eq '/tmp/scm'
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
shuttle-deploy-0.4.0 spec/path_helpers_spec.rb
shuttle-deploy-0.3.3 spec/path_helpers_spec.rb
shuttle-deploy-0.3.2 spec/path_helpers_spec.rb
shuttle-deploy-0.3.1 spec/path_helpers_spec.rb
shuttle-deploy-0.3.0 spec/path_helpers_spec.rb
shuttle-deploy-0.3.0.beta1 spec/path_helpers_spec.rb
shuttle-deploy-0.2.3 spec/path_helpers_spec.rb
shuttle-deploy-0.2.2 spec/path_helpers_spec.rb
shuttle-deploy-0.2.1 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta16 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta15 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta14 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta13 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta12 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta11 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta10 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta9 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta7 spec/path_helpers_spec.rb
shuttle-deploy-0.2.0.beta6 spec/path_helpers_spec.rb