spektrum-log 0.0.15 → 0.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/spec/reader_spec.rb DELETED
@@ -1,93 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe Spektrum::Log::Reader do
4
-
5
- context 'data file 1.TLM' do
6
-
7
- subject { Spektrum::Log::Reader.new(data_file('1.TLM')) }
8
-
9
- it { should have(3).flights }
10
-
11
- its(:duration) { should be_within(0.1).of(34.3) }
12
-
13
- end
14
-
15
- context 'data file 2.TLM' do
16
-
17
- subject { Spektrum::Log::Reader.new(data_file('2.TLM')) }
18
-
19
- it { should have(312).flights }
20
-
21
- its(:duration) { should be_within(0.1).of(1570.7) }
22
-
23
- end
24
-
25
- context 'data file 3.TLM' do
26
-
27
- subject { Spektrum::Log::Reader.new(data_file('3.TLM')) }
28
-
29
- it { should have(12).flights }
30
-
31
- its(:duration) { should be_within(0.1).of(144.8) }
32
-
33
- end
34
-
35
- context 'data file 4.TLM' do
36
-
37
- subject { Spektrum::Log::Reader.new(data_file('4.TLM')) }
38
-
39
- it { should have(1).flights }
40
-
41
- its(:duration) { should be_within(0.1).of(15.9) }
42
-
43
- end
44
-
45
- context 'data file GPS.TLM' do
46
-
47
- subject { Spektrum::Log::Reader.new(data_file('GPS.TLM')) }
48
-
49
- it { should have(2).flights }
50
-
51
- its(:duration) { should be_within(0.1).of(1431.4) }
52
-
53
- end
54
-
55
- context 'data file GPS2.TLM' do
56
-
57
- subject { Spektrum::Log::Reader.new(data_file('GPS2.TLM')) }
58
-
59
- it { should have(2).flights }
60
-
61
- its(:duration) { should be_within(0.1).of(851.0) }
62
-
63
- end
64
-
65
- context 'data file X5-GPS1.TLM' do
66
-
67
- subject { Spektrum::Log::Reader.new(data_file('X5-GPS1.TLM')) }
68
-
69
- it { should have(5).flights }
70
-
71
- its(:duration) { should be_within(0.1).of(1305.2) }
72
-
73
- end
74
-
75
- context 'data file X5-GPS2.TLM' do
76
-
77
- subject { Spektrum::Log::Reader.new(data_file('X5-GPS2.TLM')) }
78
-
79
- it { should have(2).flights }
80
-
81
- its(:duration) { should be_within(0.1).of(627.7) }
82
-
83
- end
84
-
85
- it 'should raise on bad input' do
86
- expect { Spektrum::Log::Reader.new(__FILE__) }.to raise_error
87
- end
88
-
89
- it 'should raise when file is not found' do
90
- expect { Spektrum::Log::Reader.new(data_file('NOFILE.TLM')) }.to raise_error
91
- end
92
-
93
- end