Sha256: e363cae8d56643877d2a6eccf30d2f080a80dfc560167a74bde5da18e0a31421

Contents?: true

Size: 353 Bytes

Versions: 25

Compression:

Stored size: 353 Bytes

Contents

require 'spec_helper'

fixture_path = 'spec/fixtures'

describe 'be_able_to' do
  it 'close file after using it' do
    options = {:col_sep => "\cA", :row_sep => "\cB", :comment_regexp => /^#/, :strings_as_keys => true}

    file = File.new("#{fixture_path}/binary.csv")

    SmarterCSV.process(file, options)

    file.closed?.should == true
  end
end

Version data entries

25 entries across 25 versions & 2 rubygems

Version Path
smarter_csv-1.6.1 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.6.0 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.5.2 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.5.1 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.5.0 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.4.2 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.4.0 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.3.0 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.2.8 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.2.7 spec/smarter_csv/close_file_spec.rb
pokedex-terminal-0.2.8 vendor/bundle/ruby/2.7.0/gems/smarter_csv-1.2.6/spec/smarter_csv/close_file_spec.rb
pokedex-terminal-0.2.7 vendor/bundle/ruby/2.7.0/gems/smarter_csv-1.2.6/spec/smarter_csv/close_file_spec.rb
pokedex-terminal-0.2.6 vendor/bundle/ruby/2.7.0/gems/smarter_csv-1.2.6/spec/smarter_csv/close_file_spec.rb
pokedex-terminal-0.2.5 vendor/bundle/ruby/2.7.0/gems/smarter_csv-1.2.6/spec/smarter_csv/close_file_spec.rb
pokedex-terminal-0.2.4 vendor/bundle/ruby/2.7.0/gems/smarter_csv-1.2.6/spec/smarter_csv/close_file_spec.rb
smarter_csv-1.2.6 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.2.5 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.2.4 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.2.3 spec/smarter_csv/close_file_spec.rb
smarter_csv-1.2.0 spec/smarter_csv/close_file_spec.rb