Skip to content

Commit

Permalink
rubocop autocorrections
Browse files Browse the repository at this point in the history
  • Loading branch information
infused committed May 2, 2024
1 parent 7fcc4d6 commit 17ddff2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/dbf/column.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class NameError < StandardError
M: ColumnType::Memo,
B: ColumnType::Double,
G: ColumnType::General,
'+'.to_sym => ColumnType::SignedLong2
:+ => ColumnType::SignedLong2
}
# rubocop:enable Style/MutableConstant
TYPE_CAST_CLASS.default = ColumnType::String
Expand Down
6 changes: 2 additions & 4 deletions spec/dbf/encoding_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# encoding: utf-8

require 'spec_helper'

RSpec.describe 'default encoding' do
Expand All @@ -16,7 +14,7 @@
end

it 'encodes column names' do
expect(table.column_names).to eq ['ШАР', 'ПЛОЩА']
expect(table.column_names).to eq %w[ШАР ПЛОЩА]
end

it 'encodes record values' do
Expand All @@ -38,7 +36,7 @@
end

it 'encodes column names' do
expect(table.column_names).to eq ['RN', 'NAME']
expect(table.column_names).to eq %w[RN NAME]
end

it 'encodes record values' do
Expand Down
6 changes: 3 additions & 3 deletions spec/dbf/file_formats_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
end

specify 'records should be instances of DBF::Record' do
expect(table).to all be_kind_of(DBF::Record)
expect(table).to all be_a(DBF::Record)
end

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

specify 'column lengths should be instances of Integer' do
table.columns.each do |column|
expect(column.length).to be_kind_of(Integer)
expect(column.length).to be_a(Integer)
end
end

Expand All @@ -43,7 +43,7 @@

specify 'column decimals should be instances of Integer' do
table.columns.each do |column|
expect(column.decimal).to be_kind_of(Integer)
expect(column.decimal).to be_a(Integer)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dbf/table_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
before { table.to_csv('test.csv') }

it 'creates a custom csv file' do
expect(File).to be_exist('test.csv')
expect(File).to exist('test.csv')
end
end
end
Expand Down

0 comments on commit 17ddff2

Please sign in to comment.