File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class NameError < StandardError
24
24
M : ColumnType ::Memo ,
25
25
B : ColumnType ::Double ,
26
26
G : ColumnType ::General ,
27
- '+' . to_sym => ColumnType ::SignedLong2
27
+ :+ => ColumnType ::SignedLong2
28
28
}
29
29
# rubocop:enable Style/MutableConstant
30
30
TYPE_CAST_CLASS . default = ColumnType ::String
Original file line number Diff line number Diff line change 1
- # encoding: utf-8
2
-
3
1
require 'spec_helper'
4
2
5
3
RSpec . describe 'default encoding' do
16
14
end
17
15
18
16
it 'encodes column names' do
19
- expect ( table . column_names ) . to eq [ ' ШАР' , ' ПЛОЩА' ]
17
+ expect ( table . column_names ) . to eq %w[ ШАР ПЛОЩА ]
20
18
end
21
19
22
20
it 'encodes record values' do
38
36
end
39
37
40
38
it 'encodes column names' do
41
- expect ( table . column_names ) . to eq [ 'RN' , ' NAME' ]
39
+ expect ( table . column_names ) . to eq %w[ RN NAME ]
42
40
end
43
41
44
42
it 'encodes record values' do
Original file line number Diff line number Diff line change 9
9
end
10
10
11
11
specify 'records should be instances of DBF::Record' do
12
- expect ( table ) . to all be_kind_of ( DBF ::Record )
12
+ expect ( table ) . to all be_a ( DBF ::Record )
13
13
end
14
14
15
15
specify 'record count should be the same as reported in the header' do
31
31
32
32
specify 'column lengths should be instances of Integer' do
33
33
table . columns . each do |column |
34
- expect ( column . length ) . to be_kind_of ( Integer )
34
+ expect ( column . length ) . to be_a ( Integer )
35
35
end
36
36
end
37
37
43
43
44
44
specify 'column decimals should be instances of Integer' do
45
45
table . columns . each do |column |
46
- expect ( column . decimal ) . to be_kind_of ( Integer )
46
+ expect ( column . decimal ) . to be_a ( Integer )
47
47
end
48
48
end
49
49
end
Original file line number Diff line number Diff line change 142
142
before { table . to_csv ( 'test.csv' ) }
143
143
144
144
it 'creates a custom csv file' do
145
- expect ( File ) . to be_exist ( 'test.csv' )
145
+ expect ( File ) . to exist ( 'test.csv' )
146
146
end
147
147
end
148
148
end
You can’t perform that action at this time.
0 commit comments