aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/i18n_test.rb
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-08-14 02:13:00 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2010-08-14 04:12:33 -0300
commitb451de0d6de4df6bc66b274cec73b919f823d5ae (patch)
treef252c4143a0adb3be7d36d543282539cca0fb971 /activesupport/test/i18n_test.rb
parent1590377886820e00b1a786616518a32f3b61ec0f (diff)
downloadrails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.gz
rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.bz2
rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.zip
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'activesupport/test/i18n_test.rb')
-rw-r--r--activesupport/test/i18n_test.rb34
1 files changed, 17 insertions, 17 deletions
diff --git a/activesupport/test/i18n_test.rb b/activesupport/test/i18n_test.rb
index dfcd4f822d..34825c9b8f 100644
--- a/activesupport/test/i18n_test.rb
+++ b/activesupport/test/i18n_test.rb
@@ -7,68 +7,68 @@ class I18nTest < Test::Unit::TestCase
@date = Date.parse("2008-7-2")
@time = Time.utc(2008, 7, 2, 16, 47, 1)
end
-
+
def test_time_zone_localization_with_default_format
now = Time.local(2000)
assert_equal now.strftime("%a, %d %b %Y %H:%M:%S %z"), I18n.localize(now)
end
-
+
def test_date_localization_should_use_default_format
assert_equal @date.strftime("%Y-%m-%d"), I18n.localize(@date)
end
-
+
def test_date_localization_with_default_format
assert_equal @date.strftime("%Y-%m-%d"), I18n.localize(@date, :format => :default)
end
-
+
def test_date_localization_with_short_format
assert_equal @date.strftime("%b %d"), I18n.localize(@date, :format => :short)
end
-
+
def test_date_localization_with_long_format
assert_equal @date.strftime("%B %d, %Y"), I18n.localize(@date, :format => :long)
end
-
- def test_time_localization_should_use_default_format
+
+ def test_time_localization_should_use_default_format
assert_equal @time.strftime("%a, %d %b %Y %H:%M:%S %z"), I18n.localize(@time)
end
-
+
def test_time_localization_with_default_format
assert_equal @time.strftime("%a, %d %b %Y %H:%M:%S %z"), I18n.localize(@time, :format => :default)
end
-
+
def test_time_localization_with_short_format
assert_equal @time.strftime("%d %b %H:%M"), I18n.localize(@time, :format => :short)
end
-
+
def test_time_localization_with_long_format
assert_equal @time.strftime("%B %d, %Y %H:%M"), I18n.localize(@time, :format => :long)
end
-
+
def test_day_names
assert_equal Date::DAYNAMES, I18n.translate(:'date.day_names')
end
-
+
def test_abbr_day_names
assert_equal Date::ABBR_DAYNAMES, I18n.translate(:'date.abbr_day_names')
end
-
+
def test_month_names
assert_equal Date::MONTHNAMES, I18n.translate(:'date.month_names')
end
-
+
def test_abbr_month_names
assert_equal Date::ABBR_MONTHNAMES, I18n.translate(:'date.abbr_month_names')
end
-
+
def test_date_order
assert_equal [:year, :month, :day], I18n.translate(:'date.order')
end
-
+
def test_time_am
assert_equal 'am', I18n.translate(:'time.am')
end
-
+
def test_time_pm
assert_equal 'pm', I18n.translate(:'time.pm')
end