Sha256: c13626d35aa01b345d84db93d1a1356a25b3ba9772840d80cbdc6eac5abcdd64

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

require 'spec_helper'

describe Fit::File::RecordHeader do
  context "given a sample normal header" do
    subject do
      described_class.read example_file('record/normal_header')
    end

    its(:header_type) { should == 0 }
    its(:message_type) { should == 1 }
    its(:message_type_specific) { should == 0}
    its(:local_message_type) { should == 0 }

    it { is_expected.to be_normal }
    it { is_expected.not_to be_a_compressed_timestamp }
    it { is_expected.not_to be_developer_data }
  end

  context "given a sample compressed timestamp header" do
    # TODO
  end
  
  context "given a sample normal header with developer flag set" do
    subject do
      described_class.read example_file('record/normal_header_with_developer_flag')
    end

    its(:header_type) { should == 0 }
    its(:message_type) { should == 1 }
    its(:message_type_specific) { should == 1}
    its(:local_message_type) { should == 0 }

    it { is_expected.to be_normal }
    it { is_expected.not_to be_a_compressed_timestamp }
    it { is_expected.to be_developer_data }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fit-parser-0.0.3 spec/file/record_header_spec.rb