Skip to content

Commit 17ddff2

Browse files
committed
rubocop autocorrections
1 parent 7fcc4d6 commit 17ddff2

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

lib/dbf/column.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class NameError < StandardError
2424
M: ColumnType::Memo,
2525
B: ColumnType::Double,
2626
G: ColumnType::General,
27-
'+'.to_sym => ColumnType::SignedLong2
27+
:+ => ColumnType::SignedLong2
2828
}
2929
# rubocop:enable Style/MutableConstant
3030
TYPE_CAST_CLASS.default = ColumnType::String

spec/dbf/encoding_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# encoding: utf-8
2-
31
require 'spec_helper'
42

53
RSpec.describe 'default encoding' do
@@ -16,7 +14,7 @@
1614
end
1715

1816
it 'encodes column names' do
19-
expect(table.column_names).to eq ['ШАР', 'ПЛОЩА']
17+
expect(table.column_names).to eq %w[ШАР ПЛОЩА]
2018
end
2119

2220
it 'encodes record values' do
@@ -38,7 +36,7 @@
3836
end
3937

4038
it 'encodes column names' do
41-
expect(table.column_names).to eq ['RN', 'NAME']
39+
expect(table.column_names).to eq %w[RN NAME]
4240
end
4341

4442
it 'encodes record values' do

spec/dbf/file_formats_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
end
1010

1111
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)
1313
end
1414

1515
specify 'record count should be the same as reported in the header' do
@@ -31,7 +31,7 @@
3131

3232
specify 'column lengths should be instances of Integer' do
3333
table.columns.each do |column|
34-
expect(column.length).to be_kind_of(Integer)
34+
expect(column.length).to be_a(Integer)
3535
end
3636
end
3737

@@ -43,7 +43,7 @@
4343

4444
specify 'column decimals should be instances of Integer' do
4545
table.columns.each do |column|
46-
expect(column.decimal).to be_kind_of(Integer)
46+
expect(column.decimal).to be_a(Integer)
4747
end
4848
end
4949
end

spec/dbf/table_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
before { table.to_csv('test.csv') }
143143

144144
it 'creates a custom csv file' do
145-
expect(File).to be_exist('test.csv')
145+
expect(File).to exist('test.csv')
146146
end
147147
end
148148
end

0 commit comments

Comments
 (0)