Sha256: b39c4c1ba332765b1456311f6ef01e6efb992aeeb2317b935e7ee0582e697bd9
Contents?: true
Size: 640 Bytes
Versions: 11
Compression:
Stored size: 640 Bytes
Contents
require 'spec_helper' module CodeClimate::TestReporter describe CalculateBlob do subject { CalculateBlob.new(fixture) } let(:fixture) { File.expand_path("../../fixtures/encoding_test.rb", __FILE__) } it 'hex digests content of file' do expect(subject.blob_id).to_not be_nil end context 'encoding error' do let(:fixture) { File.expand_path("../../fixtures/encoding_test_iso.rb", __FILE__) } it 'falls back to git' do expect(File).to receive(:open).and_raise(EncodingError) expect(subject.blob_id).to eq('eb82c22dadb9c47a7fed87211623f6856e112f46') end end end end
Version data entries
11 entries across 11 versions & 2 rubygems