Sha256: ef262f42df39d55d52dfc95c328d267efe60fcd044b5a461fa4cb48972b6f68f

Contents?: true

Size: 593 Bytes

Versions: 4

Compression:

Stored size: 593 Bytes

Contents

require_relative 'test_helper'

describe "FastExcel" do

  it "should create temporary file if filename is nil" do
    workbook = FastExcel.open(constant_memory: true)

    assert(workbook.tmp_file)
    assert_match(/fast_excel.xlsx$/, workbook.filename)

    result = workbook.read_string
    assert(result.size > 1000)
  end

  it "should close workbook and delete tmp file when read_string" do
    workbook = FastExcel.open
    workbook.read_string

    refute(File.exist?(workbook.filename))
    refute(File.exist?(File.dirname(workbook.filename)))
    refute(workbook.is_open)
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fast_excel-0.5.0 test/tmpfile_test.rb
fast_excel-0.4.1 test/tmpfile_test.rb
fast_excel-0.4.0 test/tmpfile_test.rb
fast_excel-0.3.0 test/tmpfile_test.rb