Sha256: 722876b8499ba2bdd400beb98cb40f3a785999254133c1df9f1be451a03459b5

Contents?: true

Size: 457 Bytes

Versions: 8

Compression:

Stored size: 457 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

8 entries across 8 versions & 1 rubygems

Version Path
compactor-0.3.12 test/date_extensions_test.rb
compactor-0.3.11 test/date_extensions_test.rb
compactor-0.3.8 test/date_extensions_test.rb
compactor-0.3.5 test/date_extensions_test.rb
compactor-0.3.4 test/date_extensions_test.rb
compactor-0.3.3 test/date_extensions_test.rb
compactor-0.2.4 test/date_extensions_test.rb
compactor-0.2.3 test/date_extensions_test.rb