diff options
Diffstat (limited to 'actionpack')
-rwxr-xr-x | actionpack/test/template/date_helper_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index 7bb6b17f5d..bd3ad09db8 100755 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -853,7 +853,7 @@ class DateHelperTest < Test::Unit::TestCase expected << "</select>\n" expected << %{<select id="post_written_on_2i" name="post[written_on(2i)]">\n} - 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Time.now.change(:month => i).strftime("%B")}</option>\n) } + 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Date::MONTHNAMES[i]}</option>\n) } expected << "</select>\n" expected << %{<select id="post_written_on_1i" name="post[written_on(1i)]">\n} @@ -873,7 +873,7 @@ class DateHelperTest < Test::Unit::TestCase expected << "</select>\n" expected << %{<select id="post_written_on_2i" name="post[written_on(2i)]">\n} - 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == Time.now.month}>#{Time.now.change(:month => i).strftime("%B")}</option>\n) } + 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == Time.now.month}>#{Date::MONTHNAMES[i]}</option>\n) } expected << "</select>\n" expected << %{<select id="post_written_on_3i" name="post[written_on(3i)]">\n} @@ -895,7 +895,7 @@ class DateHelperTest < Test::Unit::TestCase expected << %{<select id="post_written_on_2i" name="post[written_on(2i)]">\n} expected << "<option value=\"\"></option>\n" - 1.upto(12) { |i| expected << %(<option value="#{i}">#{Time.now.change(:month => i).strftime("%B")}</option>\n) } + 1.upto(12) { |i| expected << %(<option value="#{i}">#{Date::MONTHNAMES[i]}</option>\n) } expected << "</select>\n" expected << %{<select id="post_written_on_3i" name="post[written_on(3i)]">\n} @@ -1178,7 +1178,7 @@ class DateHelperTest < Test::Unit::TestCase 1999.upto(2009) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 2004}>#{i}</option>\n) } expected << "</select>\n" expected << %{<select id="post_updated_at_2i" name="post[updated_at(2i)]">\n} - 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Time.now.change(:month => i).strftime("%B")}</option>\n) } + 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Date::MONTHNAMES[i]}</option>\n) } expected << "</select>\n" expected << %{<select id="post_updated_at_3i" name="post[updated_at(3i)]">\n} 1.upto(31) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 15}>#{i}</option>\n) } @@ -1207,7 +1207,7 @@ class DateHelperTest < Test::Unit::TestCase expected = %{<input type="hidden" id="post_updated_at_1i" name="post[updated_at(1i)]" value="2004" />\n} expected << %{<select id="post_updated_at_2i" name="post[updated_at(2i)]">\n} - 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Time.now.change(:month => i).strftime("%B")}</option>\n) } + 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Date::MONTHNAMES[i]}</option>\n) } expected << "</select>\n" expected << %{<select id="post_updated_at_3i" name="post[updated_at(3i)]">\n} 1.upto(31) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 15}>#{i}</option>\n) } @@ -1276,7 +1276,7 @@ class DateHelperTest < Test::Unit::TestCase 1.upto(31) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 15}>#{i}</option>\n) } expected << "</select>\n" expected << %{<select id="post_updated_at_2i" name="post[updated_at(2i)]">\n} - 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Time.now.change(:month => i).strftime("%B")}</option>\n) } + 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Date::MONTHNAMES[i]}</option>\n) } expected << "</select>\n" expected << %{<select id="post_updated_at_1i" name="post[updated_at(1i)]">\n} 1999.upto(2009) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 2004}>#{i}</option>\n) } @@ -1304,7 +1304,7 @@ class DateHelperTest < Test::Unit::TestCase 1.upto(31) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 15}>#{i}</option>\n) } expected << "</select>\n" expected << %{<select id="post_updated_at_2i" name="post[updated_at(2i)]">\n} - 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Time.now.change(:month => i).strftime("%B")}</option>\n) } + 1.upto(12) { |i| expected << %(<option value="#{i}"#{' selected="selected"' if i == 6}>#{Date::MONTHNAMES[i]}</option>\n) } expected << "</select>\n" expected << " — " |