Sha256: 17305629cf22967e63319a68377646c357d2c0e50141f114c8b17faff9bad664
Contents?: true
Size: 581 Bytes
Versions: 2
Compression:
Stored size: 581 Bytes
Contents
require 'test_helper' class DateTimeFormatsTest < ActiveSupport::TestCase test "date time formats" do assert_equal "01-01-2012", Time.new(2012, 1, 1).to_s(:dash) assert_equal "01/01/2012", Time.new(2012, 1, 1).to_s(:slash) assert_equal "Sunday January 01, 2012", Time.new(2012, 1, 1).to_s(:full) end test "use date time formats in Rails app" do assert_equal "new format", Time.now.to_s(:new_format) end test "Rails app date time formats override default formats provided with Gem" do assert_equal "overrides format", Time.now.to_s(:year) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
date_time_formats-0.1.1 | test/date_time_formats_test.rb |
date_time_formats-0.1.0 | test/date_time_formats_test.rb |