Sha256: 6307949c09a606e4919e78854cb46ecd549545ca2ba5c70a9eee9bbe6261c768

Contents?: true

Size: 798 Bytes

Versions: 49

Compression:

Stored size: 798 Bytes

Contents

#!/usr/bin/env ruby
# Excel::TestReader -- Spreadsheet -- 22.01.2013

$: << File.expand_path('../../../lib', File.dirname(__FILE__))

require 'test/unit'

module Spreadsheet
  module Excel
    class TestReader < Test::Unit::TestCase
      def test_empty_file_error_on_setup
        reader = Spreadsheet::Excel::Reader.new
        empty_io = StringIO.new
        assert_raise RuntimeError do
          reader.setup empty_io
        end
      end

      def test_not_empty_file_error_on_setup
        reader = Spreadsheet::Excel::Reader.new
        data = File.expand_path File.join('test', 'data')
        path = File.join data, 'test_empty.xls'
        not_empty_io = File.open(path, "rb")
        assert_nothing_thrown do
          reader.setup not_empty_io
        end
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 3 rubygems

Version Path
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/spreadsheet-1.0.3/test/excel/reader.rb
spreadsheet-1.0.3 test/excel/reader.rb
spreadsheet-1.0.2 test/excel/reader.rb
spreadsheet-1.0.1 test/excel/reader.rb
spreadsheet-1.0.0 test/excel/reader.rb
spreadsheet-0.9.9 test/excel/reader.rb
spreadsheet-0.9.8 test/excel/reader.rb
spreadsheet-0.9.7 test/excel/reader.rb
spreadsheet-0.9.6 test/excel/reader.rb
spreadsheet-0.9.5 test/excel/reader.rb
keeguon-spreadsheet-0.9.3 test/excel/reader.rb
spreadsheet-0.9.4 test/excel/reader.rb
spreadsheet-0.9.3 test/excel/reader.rb
spreadsheet-0.9.2 test/excel/reader.rb
spreadsheet-0.9.1 test/excel/reader.rb
spreadsheet-0.9.0 test/excel/reader.rb
spreadsheet-0.8.9 test/excel/reader.rb
spreadsheet-0.8.8 test/excel/reader.rb
spreadsheet-0.8.7 test/excel/reader.rb
spreadsheet-0.8.6 test/excel/reader.rb