Sha256: 8e6b339b71772c52ffd6d40f8d397cd0242ab2bcafd72a2f40b069f5bd1b2c65

Contents?: true

Size: 793 Bytes

Versions: 13

Compression:

Stored size: 793 Bytes

Contents

require 'spec_helper'

describe FitParser::File::Header do
  context 'given a sample FIT header' do
    subject do
      described_class.read example_file('file/header')
    end

    its(:header_size) { should == 12 }
    its(:protocol_version) { should == 16 }
    its(:profile_version) { should == 64 }
    its(:data_size) { should == 36_069 }
    its(:data_type) { should == '.FIT' }
  end

  context 'given a sample header file of 14 bytes length' do
    subject do
      described_class.read example_file('file/header_14b.fit')
    end

    its(:header_size) { should == 14 }
    its(:protocol_version) { should == 16 }
    its(:profile_version) { should == 411 }
    its(:data_size) { should == 325 }
    its(:data_type) { should == '.FIT' }
    its(:crc) { should == 17_101 }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
fit_parser-1.0.9 spec/file/header_spec.rb
fit_parser-1.0.8 spec/file/header_spec.rb
fit_parser-1.0.7 spec/file/header_spec.rb
fit_parser-1.0.6 spec/file/header_spec.rb
fit_parser-1.0.5 spec/file/header_spec.rb
fit_parser-1.0.4 spec/file/header_spec.rb
fit_parser-1.0.3 spec/file/header_spec.rb
fit_parser-1.0.2 spec/file/header_spec.rb
fit_parser-1.0.1 spec/file/header_spec.rb
fit_parser-1.0.0 spec/file/header_spec.rb
fit_parser-0.0.8 spec/file/header_spec.rb
fit_parser-0.0.7 spec/file/header_spec.rb
fit_parser-0.0.6 spec/file/header_spec.rb