Sha256: b5a02e34170b4107aa751f02867820d5e9dc4808b6f4f9da1f5229bfcab19b6d

Contents?: true

Size: 693 Bytes

Versions: 40

Compression:

Stored size: 693 Bytes

Contents

describe KnapsackPro::RepositoryAdapters::GitAdapter do
  let!(:circle_sha1) { ENV['CIRCLE_SHA1'] }
  let!(:circle_branch) { ENV['CIRCLE_BRANCH'] }

  before do
    stub_const('ENV', {
      'KNAPSACK_PRO_PROJECT_DIR' => KnapsackPro.root,
    })
  end

  it { should be_kind_of KnapsackPro::RepositoryAdapters::BaseAdapter }

  describe '#commit_hash' do
    subject { described_class.new.commit_hash }

    it { should_not be_nil }
    its(:size) { should eq 40 }
    it { should eq circle_sha1 } if ENV['CIRCLE_SHA1']
  end

  describe '#branch' do
    subject { described_class.new.branch }

    it { should_not be_nil }
    it { should eq circle_branch } if ENV['CIRCLE_BRANCH']
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
knapsack_pro-0.31.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.30.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.29.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.28.1 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.28.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.27.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.26.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.25.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.24.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.23.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.22.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.21.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.20.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.19.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.18.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.17.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.16.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.15.2 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.15.1 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.15.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb