Sha256: 3a5498c3b3e22f96ae9bdfdffcae85c80a6f6f20cd1465b88999ff5b8b469c72

Contents?: true

Size: 815 Bytes

Versions: 1

Compression:

Stored size: 815 Bytes

Contents

require 'spec_helper'

describe Fit::File::Record do
  before { described_class.clear_definitions! }

  describe ".read" do
    subject { described_class.read(file) }

    context "given a sample definition record" do
      let(:file) { example_file('record/definition_record') }

      its(:header) { should be_a(Fit::File::RecordHeader) }
      its(:content) { should be_a(Fit::File::Definition) }
    end

    context "given a sample data record" do
      let(:file) { nil }
    end
  end

  describe ".clear_definitions" do
    it "should clear the definitions class variable" do
      described_class.read example_file('record/definition_record')
      described_class.definitions.should_not be_empty
      described_class.clear_definitions!
      described_class.definitions.should be_empty
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
garmin-fit-0.0.2 spec/file/record_spec.rb