Sha256: aa0a24eb0dbcad100dff9c7c28e7b4e85cba7ae4f2a9849eca47cf9c2f633458

Contents?: true

Size: 460 Bytes

Versions: 4

Compression:

Stored size: 460 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class DateExtensionsTest < Test::Unit::TestCase
  def test_parse_strings_separated_by_dashes
    assert_equal "01/01/12", Date.parse_to_us_format("2012-1-1")
  end

  def test_parse_strings_separated_by_slashes
    assert_equal "12/31/11", Date.parse_to_us_format("12/31/2011")
  end

  def test_convert_dates_to_strings
    assert_equal "01/01/12", Date.parse_to_us_format(Date.parse("2012-1-1"))
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
compactor-0.5.0 test/compactor/date_extensions_test.rb
compactor-0.4.7 test/compactor/date_extensions_test.rb
compactor-0.4.6 test/compactor/date_extensions_test.rb
compactor-0.4.5 test/compactor/date_extensions_test.rb