Sha256: 2f7d24230d0059afc259e2735b2c5f007997e2b9a33b1197fe149ff5ae8cfd4f

Contents?: true

Size: 396 Bytes

Versions: 25

Compression:

Stored size: 396 Bytes

Contents

require "spec_helper"

describe Codacy::Git do
  describe 'commit hash' do
    it 'recognizes CI environment variable.' do
      expected_git_hash = "123456789"

      original_val = ENV['TRAVIS_COMMIT']
      ENV['TRAVIS_COMMIT'] = expected_git_hash

      result = Codacy::Git.commit_id

      ENV['TRAVIS_COMMIT'] = original_val

      expect(result).to eq expected_git_hash
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
codacy-coverage-2.2.1 spec/codacy/git_spec.rb
codacy-coverage-2.2.0 spec/codacy/git_spec.rb
codacy-coverage-2.1.5 spec/codacy/git_spec.rb
codacy-coverage-2.1.4 spec/codacy/git_spec.rb
codacy-coverage-2.1.0 spec/codacy/git_spec.rb
codacy-coverage-2.0.1 spec/codacy/git_spec.rb
codacy-coverage-2.0.0 spec/codacy/git_spec.rb
codacy-coverage-1.1.8 spec/codacy/git_spec.rb
codacy-coverage-1.1.7 spec/codacy/git_spec.rb
codacy-coverage-1.1.6 spec/codacy/git_spec.rb
codacy-coverage-1.1.5 spec/codacy/git_spec.rb
codacy-coverage-1.1.4 spec/codacy/git_spec.rb
codacy-coverage-1.1.3 spec/codacy/git_spec.rb
codacy-coverage-1.1.1 spec/codacy/git_spec.rb
codacy-coverage-1.1.0 spec/codacy/git_spec.rb
codacy-coverage-1.0.0 spec/codacy/git_spec.rb
codacy-coverage-0.3.1 spec/codacy/git_spec.rb
codacy-coverage-0.3.0 spec/codacy/git_spec.rb
codacy-coverage-0.2.4 spec/codacy/git_spec.rb
codacy-coverage-0.2.3 spec/codacy/git_spec.rb