Sha256: e377e366bb01c44f787dca857281b7b39b4ff00e2ca2e16b00e2505b38741179

Contents?: true

Size: 838 Bytes

Versions: 15

Compression:

Stored size: 838 Bytes

Contents

require 'test_helper'

class TestRooExcelxCellNumber < Minitest::Test
  def boolean
    Roo::Excelx::Cell::Boolean
  end

  def test_formatted_value
    cell = boolean.new '1', nil, nil, nil, nil
    assert_equal 'TRUE', cell.formatted_value

    cell = boolean.new '0', nil, nil, nil, nil
    assert_equal 'FALSE', cell.formatted_value
  end

  def test_to_s
    cell = boolean.new '1', nil, nil, nil, nil
    assert_equal 'TRUE', cell.to_s

    cell = boolean.new '0', nil, nil, nil, nil
    assert_equal 'FALSE', cell.to_s
  end

  def test_cell_value
    cell = boolean.new '1', nil, nil, nil, nil
    assert_equal '1', cell.cell_value
  end

  def test_value
    cell = boolean.new '1', nil, nil, nil, nil
    assert_equal true, cell.value

    cell = boolean.new '0', nil, nil, nil, nil
    assert_equal false, cell.value
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
roo-2.10.1 test/excelx/cell/test_boolean.rb
roo-2.10.0 test/excelx/cell/test_boolean.rb
roo-2.9.0 test/excelx/cell/test_boolean.rb
roo-2.8.3 test/excelx/cell/test_boolean.rb
roo-2.8.2 test/excelx/cell/test_boolean.rb
roo-2.8.1 test/excelx/cell/test_boolean.rb
roo-2.8.0 test/excelx/cell/test_boolean.rb
roo-2.7.1 test/excelx/cell/test_boolean.rb
roo-2.7.0 test/excelx/cell/test_boolean.rb
roo-2.6.0 test/excelx/cell/test_boolean.rb
roo-2.5.1 test/excelx/cell/test_boolean.rb
roo-2.5.0 test/excelx/cell/test_boolean.rb
roo-2.4.0 test/excelx/cell/test_boolean.rb
roo-2.3.2 test/excelx/cell/test_boolean.rb
roo-2.3.1 test/excelx/cell/test_boolean.rb