diff --git a/.rspec b/.rspec new file mode 100644 index 00000000..c99d2e73 --- /dev/null +++ b/.rspec @@ -0,0 +1 @@ +--require spec_helper diff --git a/spec/features/binary/binary_file_spec.rb b/spec/features/binary/binary_file_spec.rb index b7377e58..f38a0d48 100644 --- a/spec/features/binary/binary_file_spec.rb +++ b/spec/features/binary/binary_file_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' # this reads a binary database dump file, which is in structure like a CSV file diff --git a/spec/features/chunked/chunked_reading_spec.rb b/spec/features/chunked/chunked_reading_spec.rb index 95dd661b..8d450fc3 100644 --- a/spec/features/chunked/chunked_reading_spec.rb +++ b/spec/features/chunked/chunked_reading_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'chunked reading' do diff --git a/spec/features/chunked/chunked_spec.rb b/spec/features/chunked/chunked_spec.rb index 70eaa62a..c201b32d 100644 --- a/spec/features/chunked/chunked_spec.rb +++ b/spec/features/chunked/chunked_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' class Processor diff --git a/spec/features/converters/convert_values_to_numeric_spec.rb b/spec/features/converters/convert_values_to_numeric_spec.rb index a34d03b2..f61e95be 100644 --- a/spec/features/converters/convert_values_to_numeric_spec.rb +++ b/spec/features/converters/convert_values_to_numeric_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'numeric conversion of values' do diff --git a/spec/features/converters/value_converters_spec.rb b/spec/features/converters/value_converters_spec.rb index abcd99fe..04c2e565 100644 --- a/spec/features/converters/value_converters_spec.rb +++ b/spec/features/converters/value_converters_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' require 'date' diff --git a/spec/features/formating/bom_issues_spec.rb b/spec/features/formating/bom_issues_spec.rb index fd4c6e18..ddf83a05 100644 --- a/spec/features/formating/bom_issues_spec.rb +++ b/spec/features/formating/bom_issues_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'BOM Tests' do diff --git a/spec/features/formating/carriage_return_spec.rb b/spec/features/formating/carriage_return_spec.rb index 397bf11e..e598bc2a 100644 --- a/spec/features/formating/carriage_return_spec.rb +++ b/spec/features/formating/carriage_return_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'process files with line endings explicitly pre-specified' do diff --git a/spec/features/formating/column_separator_spec.rb b/spec/features/formating/column_separator_spec.rb index 6785ff15..c729c7b0 100644 --- a/spec/features/formating/column_separator_spec.rb +++ b/spec/features/formating/column_separator_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'can handle col_sep' do diff --git a/spec/features/formating/emoji_spec.rb b/spec/features/formating/emoji_spec.rb index f2ae1be3..6a89a5b3 100644 --- a/spec/features/formating/emoji_spec.rb +++ b/spec/features/formating/emoji_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' [true, false].each do |bool| diff --git a/spec/features/formating/line_ending_spec.rb b/spec/features/formating/line_ending_spec.rb index d0b13ec1..d937929c 100644 --- a/spec/features/formating/line_ending_spec.rb +++ b/spec/features/formating/line_ending_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'process files with line endings explicitly pre-specified' do diff --git a/spec/features/formating/valid_unicode_spec.rb b/spec/features/formating/valid_unicode_spec.rb index 00493a29..89d6a40a 100644 --- a/spec/features/formating/valid_unicode_spec.rb +++ b/spec/features/formating/valid_unicode_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'valid unicode' do diff --git a/spec/features/general/additional_separator_spec.rb b/spec/features/general/additional_separator_spec.rb index 598e3bda..ba508773 100644 --- a/spec/features/general/additional_separator_spec.rb +++ b/spec/features/general/additional_separator_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'handling of additional trailing column separators' do diff --git a/spec/features/general/basic_spec.rb b/spec/features/general/basic_spec.rb index 37b1eb5e..39ef5181 100644 --- a/spec/features/general/basic_spec.rb +++ b/spec/features/general/basic_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' [true, false].each do |bool| diff --git a/spec/features/general/empty_columns_spec.rb b/spec/features/general/empty_columns_spec.rb index 88a15ba7..c7adc293 100644 --- a/spec/features/general/empty_columns_spec.rb +++ b/spec/features/general/empty_columns_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'can handle empty columns' do diff --git a/spec/features/general/simple_spec.rb b/spec/features/general/simple_spec.rb index b4ebaf85..95d0a7ab 100644 --- a/spec/features/general/simple_spec.rb +++ b/spec/features/general/simple_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'handling files with one column' do diff --git a/spec/features/hash_transformations/remove_empty_values_spec.rb b/spec/features/hash_transformations/remove_empty_values_spec.rb index 788eb826..01053bff 100644 --- a/spec/features/hash_transformations/remove_empty_values_spec.rb +++ b/spec/features/hash_transformations/remove_empty_values_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':remove_empty_values option' do diff --git a/spec/features/hash_transformations/remove_keys_from_hashes_spec.rb b/spec/features/hash_transformations/remove_keys_from_hashes_spec.rb index 065920b2..23e63632 100644 --- a/spec/features/hash_transformations/remove_keys_from_hashes_spec.rb +++ b/spec/features/hash_transformations/remove_keys_from_hashes_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':remove_zero_values option' do diff --git a/spec/features/hash_transformations/remove_not_mapped_keys_spec.rb b/spec/features/hash_transformations/remove_not_mapped_keys_spec.rb index 522f538a..c1f11d93 100644 --- a/spec/features/hash_transformations/remove_not_mapped_keys_spec.rb +++ b/spec/features/hash_transformations/remove_not_mapped_keys_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':remove_unmapped_keys option' do diff --git a/spec/features/hash_transformations/remove_values_matching_spec.rb b/spec/features/hash_transformations/remove_values_matching_spec.rb index 7484dd3a..bde1645a 100644 --- a/spec/features/hash_transformations/remove_values_matching_spec.rb +++ b/spec/features/hash_transformations/remove_values_matching_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':remove_values_matching option' do diff --git a/spec/features/hash_transformations/remove_zero_values_spec.rb b/spec/features/hash_transformations/remove_zero_values_spec.rb index 7aa07c0d..2c8c92c3 100644 --- a/spec/features/hash_transformations/remove_zero_values_spec.rb +++ b/spec/features/hash_transformations/remove_zero_values_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':remove_zero_values option' do diff --git a/spec/features/header_handling/duplicate_headers_spec.rb b/spec/features/header_handling/duplicate_headers_spec.rb index f11c7dde..6288e977 100644 --- a/spec/features/header_handling/duplicate_headers_spec.rb +++ b/spec/features/header_handling/duplicate_headers_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'duplicate headers' do diff --git a/spec/features/header_handling/header_transformation_spec.rb b/spec/features/header_handling/header_transformation_spec.rb index 4a704639..49fe2af6 100644 --- a/spec/features/header_handling/header_transformation_spec.rb +++ b/spec/features/header_handling/header_transformation_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'header transformations option' do diff --git a/spec/features/header_handling/invalid_headers_spec.rb b/spec/features/header_handling/invalid_headers_spec.rb index 2e989ad4..19d9d11a 100644 --- a/spec/features/header_handling/invalid_headers_spec.rb +++ b/spec/features/header_handling/invalid_headers_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' # diff --git a/spec/features/header_handling/keep_headers_spec.rb b/spec/features/header_handling/keep_headers_spec.rb index f2d6a5d9..4958555b 100644 --- a/spec/features/header_handling/keep_headers_spec.rb +++ b/spec/features/header_handling/keep_headers_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':keep_original_headers option' do diff --git a/spec/features/header_handling/key_mapping_spec.rb b/spec/features/header_handling/key_mapping_spec.rb index 39e61b5f..4c66beb2 100644 --- a/spec/features/header_handling/key_mapping_spec.rb +++ b/spec/features/header_handling/key_mapping_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'key_mapping' do diff --git a/spec/features/header_handling/no_header_spec.rb b/spec/features/header_handling/no_header_spec.rb index 9955cb11..1ba727c7 100644 --- a/spec/features/header_handling/no_header_spec.rb +++ b/spec/features/header_handling/no_header_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'no header in file' do diff --git a/spec/features/header_handling/not_downcase_header_spec.rb b/spec/features/header_handling/not_downcase_header_spec.rb index 2124a718..f59b9bc5 100644 --- a/spec/features/header_handling/not_downcase_header_spec.rb +++ b/spec/features/header_handling/not_downcase_header_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':downcase_header option' do diff --git a/spec/features/header_handling/required_headers_spec.rb b/spec/features/header_handling/required_headers_spec.rb index 99dc9884..d30a231a 100644 --- a/spec/features/header_handling/required_headers_spec.rb +++ b/spec/features/header_handling/required_headers_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'required_headers -> required_keys' do diff --git a/spec/features/header_handling/silence_missing_keys_spec.rb b/spec/features/header_handling/silence_missing_keys_spec.rb index 03319f1c..8e230633 100644 --- a/spec/features/header_handling/silence_missing_keys_spec.rb +++ b/spec/features/header_handling/silence_missing_keys_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'silence missing keys' do diff --git a/spec/features/header_handling/strings_as_keys_spec.rb b/spec/features/header_handling/strings_as_keys_spec.rb index 5bf1266d..b31629ff 100644 --- a/spec/features/header_handling/strings_as_keys_spec.rb +++ b/spec/features/header_handling/strings_as_keys_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':strings_as_keys option' do diff --git a/spec/features/header_handling/strip_chars_from_headers_spec.rb b/spec/features/header_handling/strip_chars_from_headers_spec.rb index db904d73..0e529c72 100644 --- a/spec/features/header_handling/strip_chars_from_headers_spec.rb +++ b/spec/features/header_handling/strip_chars_from_headers_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':strip_chars_from_headers option' do diff --git a/spec/features/ignore_comments_spec.rb b/spec/features/ignore_comments_spec.rb index 956774a5..f28b8797 100644 --- a/spec/features/ignore_comments_spec.rb +++ b/spec/features/ignore_comments_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':comment_regexp option' do diff --git a/spec/features/quotes/escaped_quote_chars_spec.rb b/spec/features/quotes/escaped_quote_chars_spec.rb index 6f9bd31c..297cd0f9 100644 --- a/spec/features/quotes/escaped_quote_chars_spec.rb +++ b/spec/features/quotes/escaped_quote_chars_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' [true, false].each do |bool| diff --git a/spec/features/quotes/quoted_spec.rb b/spec/features/quotes/quoted_spec.rb index 4ee627a3..0d598bc8 100644 --- a/spec/features/quotes/quoted_spec.rb +++ b/spec/features/quotes/quoted_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'loading file with quoted fields' do diff --git a/spec/features/skip_lines_spec.rb b/spec/features/skip_lines_spec.rb index 6b19e380..7dfa632c 100644 --- a/spec/features/skip_lines_spec.rb +++ b/spec/features/skip_lines_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe ':skip_lines option' do diff --git a/spec/features/special_cases/hard_sample_spec.rb b/spec/features/special_cases/hard_sample_spec.rb index fbaf1c0a..e43579a3 100644 --- a/spec/features/special_cases/hard_sample_spec.rb +++ b/spec/features/special_cases/hard_sample_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'can handle the difficult CSV file' do diff --git a/spec/features/special_cases/malformed_spec.rb b/spec/features/special_cases/malformed_spec.rb index 5436bcf5..dc949890 100644 --- a/spec/features/special_cases/malformed_spec.rb +++ b/spec/features/special_cases/malformed_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' # according to RFC-4180 quotes inside of "words" shouldbe doubled, but our parser is robust against that. diff --git a/spec/features/special_cases/problematic_spec.rb b/spec/features/special_cases/problematic_spec.rb index 06417686..f8696dc9 100644 --- a/spec/features/special_cases/problematic_spec.rb +++ b/spec/features/special_cases/problematic_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'loading file with UTF-8 characters in the header' do diff --git a/spec/features/special_cases/trading_spec.rb b/spec/features/special_cases/trading_spec.rb index c6d99ac9..b88da4e2 100644 --- a/spec/features/special_cases/trading_spec.rb +++ b/spec/features/special_cases/trading_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' # somebody reported that a column called 'options_trader' would be truncated to 'trader' diff --git a/spec/smarter_csv/blank_spec.rb b/spec/smarter_csv/blank_spec.rb index 07dcf8ac..d6447908 100644 --- a/spec/smarter_csv/blank_spec.rb +++ b/spec/smarter_csv/blank_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - describe 'blank?' do it 'is true for nil' do expect(SmarterCSV.send(:blank?, nil)).to eq true diff --git a/spec/smarter_csv/close_file_spec.rb b/spec/smarter_csv/close_file_spec.rb index cf6b6eb8..a1541b62 100644 --- a/spec/smarter_csv/close_file_spec.rb +++ b/spec/smarter_csv/close_file_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'file operations' do diff --git a/spec/smarter_csv/file_encoding_spec.rb b/spec/smarter_csv/file_encoding_spec.rb index dce39fff..c698e40b 100644 --- a/spec/smarter_csv/file_encoding_spec.rb +++ b/spec/smarter_csv/file_encoding_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - RSpec.describe SmarterCSV do describe 'encoding warning message' do let(:file_path) { 'path/to/csvfile.csv' } diff --git a/spec/smarter_csv/option_validations_spec.rb b/spec/smarter_csv/option_validations_spec.rb index 9f070944..f497b1d3 100644 --- a/spec/smarter_csv/option_validations_spec.rb +++ b/spec/smarter_csv/option_validations_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - fixture_path = 'spec/fixtures' describe 'option validations' do diff --git a/spec/smarter_csv/options_processing_spec.rb b/spec/smarter_csv/options_processing_spec.rb index 61b65732..df738bf0 100644 --- a/spec/smarter_csv/options_processing_spec.rb +++ b/spec/smarter_csv/options_processing_spec.rb @@ -1,7 +1,5 @@ # frozen_string_literal: true -require 'spec_helper' - describe 'options processing' do describe '#process_options' do it 'prints out given options in verbose mode' do diff --git a/spec/smarter_csv/parse/column_separator_spec.rb b/spec/smarter_csv/parse/column_separator_spec.rb index eb8ecaf4..74ed7de3 100644 --- a/spec/smarter_csv/parse/column_separator_spec.rb +++ b/spec/smarter_csv/parse/column_separator_spec.rb @@ -12,8 +12,6 @@ # code paths are behaving identically. # ------------------------------------------------------------------------------------------ -require 'spec_helper' - [true, false].each do |bool| describe "fulfills RFC-4180 and more with#{bool ? ' C-' : 'out '}acceleration" do describe 'parse with col_sep' do diff --git a/spec/smarter_csv/parse/max_size_spec.rb b/spec/smarter_csv/parse/max_size_spec.rb index fa2f7e44..8bbadc72 100644 --- a/spec/smarter_csv/parse/max_size_spec.rb +++ b/spec/smarter_csv/parse/max_size_spec.rb @@ -12,8 +12,6 @@ # code paths are behaving identically. # ------------------------------------------------------------------------------------------ -require 'spec_helper' - # the purpose of the max_size parameter is to handle a corner case where # CSV lines contain more fields than the header. # In which case the remaining fields in the line are ignored diff --git a/spec/smarter_csv/parse/old_csv_library_spec.rb b/spec/smarter_csv/parse/old_csv_library_spec.rb index 9231f7d4..c106bc80 100644 --- a/spec/smarter_csv/parse/old_csv_library_spec.rb +++ b/spec/smarter_csv/parse/old_csv_library_spec.rb @@ -12,8 +12,6 @@ # code paths are behaving identically. # ------------------------------------------------------------------------------------------ -require 'spec_helper' - [true, false].each do |bool| describe "fulfills RFC-4180 and more with#{bool ? ' C-' : 'out '}acceleration" do describe 'old CSV library parsing tests' do diff --git a/spec/smarter_csv/parse/rfc4180_and_more_spec.rb b/spec/smarter_csv/parse/rfc4180_and_more_spec.rb index e315cf2a..b47894d1 100644 --- a/spec/smarter_csv/parse/rfc4180_and_more_spec.rb +++ b/spec/smarter_csv/parse/rfc4180_and_more_spec.rb @@ -12,8 +12,6 @@ # code paths are behaving identically. # ------------------------------------------------------------------------------------------ -require 'spec_helper' - [true, false].each do |bool| describe "fulfills RFC-4180 and more with#{bool ? ' C-' : 'out '}acceleration" do let(:options) { {col_sep: ',', row_sep: $INPUT_RECORD_SEPARATOR, quote_char: '"', acceleration: bool } }