Sha256: 3fafcaaea62a773cdee9ca38cb800a3dfe9d868c5eb9d80dd7f7fdc943e25a0c

Contents?: true

Size: 697 Bytes

Versions: 13

Compression:

Stored size: 697 Bytes

Contents

#!/usr/bin/env ruby
# Excel::TestRow -- Spreadsheet -- 12.10.2008 -- hwyss@ywesee.com

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

require 'test/unit'
require 'spreadsheet'

module Spreadsheet
  module Excel
class TestRow < Test::Unit::TestCase
  def setup
    @workbook = Excel::Workbook.new
    @worksheet = Excel::Worksheet.new
    @workbook.add_worksheet @worksheet
  end
  def test_date
    row = Row.new @worksheet, 0, [nil, 27627.6789]
    assert_equal Date.new(1975,8,21), row.date(1)
  end
  def test_datetime
    row = Row.new @worksheet, 0, [nil, 27627.6789]
    d1 = DateTime.new(1975,8,21) + 0.6789
    d2 = row.datetime 1
    assert_equal d1, d2
  end
end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
spreadsheet-0.6.1.2 test/excel/row.rb
spreadsheet-0.6.1.3 test/excel/row.rb
spreadsheet-0.6.0 test/excel/row.rb
spreadsheet-0.6.1.1 test/excel/row.rb
spreadsheet-0.6.1 test/excel/row.rb
spreadsheet-0.6.1.7 test/excel/row.rb
spreadsheet-0.6.2 test/excel/row.rb
spreadsheet-0.6.2.1 test/excel/row.rb
spreadsheet-0.6.1.4 test/excel/row.rb
spreadsheet-0.6.1.6 test/excel/row.rb
spreadsheet-0.6.1.9 test/excel/row.rb
spreadsheet-0.6.1.8 test/excel/row.rb
spreadsheet-0.6.1.5 test/excel/row.rb