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.14.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.13.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.12.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.11.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.10.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.9.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.8.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.7.2 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.7.1 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.7.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.6.1 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.6.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.5.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.4.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.3.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.2.1 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.2.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.1.2 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.1.1 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb
knapsack_pro-0.1.0 spec/knapsack_pro/repository_adapters/git_adapter_spec.rb