icharger-log 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,48 @@ describe ICharger::Log::File do
14
14
 
15
15
  its(:duration) { should be_within(0.1).of(44.6) }
16
16
 
17
+ it { should have(447).milliseconds }
18
+
19
+ it { should have(447).currents }
20
+
21
+ it { should have(447).input_voltages }
22
+
23
+ it { should have(447).pack_voltages }
24
+
25
+ it { should have(447).capacities }
26
+
27
+ its(:internal_temperatures?) { should be_true }
28
+
29
+ it { should have(447).internal_temperatures }
30
+
31
+ its(:external_temperatures?) { should be_false }
32
+
33
+ its(:cell_count) { should eql(6) }
34
+
35
+ it 'should have correct cell voltages count' do
36
+ expect(subject.cell_voltages(0)).to have(447).items
37
+ expect(subject.cell_voltages(1)).to have(447).items
38
+ expect(subject.cell_voltages(2)).to have(447).items
39
+ expect(subject.cell_voltages(3)).to have(447).items
40
+ expect(subject.cell_voltages(4)).to have(447).items
41
+ expect(subject.cell_voltages(5)).to have(447).items
42
+ end
43
+
44
+ it 'should have select cell voltages' do
45
+ expect(subject.cell_voltages(0)[0]).to be_within(0.01).of(3.79)
46
+ expect(subject.cell_voltages(1)[0]).to be_within(0.01).of(3.79)
47
+ expect(subject.cell_voltages(2)[0]).to be_within(0.01).of(3.79)
48
+ expect(subject.cell_voltages(3)[0]).to be_within(0.01).of(3.79)
49
+ expect(subject.cell_voltages(4)[0]).to be_within(0.01).of(3.79)
50
+ expect(subject.cell_voltages(5)[0]).to be_within(0.01).of(3.79)
51
+ expect(subject.cell_voltages(0)[50]).to be_within(0.01).of(3.84)
52
+ expect(subject.cell_voltages(1)[50]).to be_within(0.01).of(3.84)
53
+ expect(subject.cell_voltages(2)[50]).to be_within(0.01).of(3.84)
54
+ expect(subject.cell_voltages(3)[50]).to be_within(0.01).of(3.84)
55
+ expect(subject.cell_voltages(4)[50]).to be_within(0.01).of(3.84)
56
+ expect(subject.cell_voltages(5)[50]).to be_within(0.01).of(3.84)
57
+ end
58
+
17
59
  end
18
60
 
19
61
  context 'data file LiPo[Storage_953_CH2].txt' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: icharger-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Veys
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-02 00:00:00.000000000 Z
11
+ date: 2013-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
166
166
  version: '0'
167
167
  requirements: []
168
168
  rubyforge_project:
169
- rubygems_version: 2.0.3
169
+ rubygems_version: 2.0.6
170
170
  signing_key:
171
171
  specification_version: 4
172
172
  summary: iCharger log file reader