From 278186534c0ccf285a20497461f40d2e54aa20a0 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 3 Feb 2009 18:25:37 -0800 Subject: Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. --- actionpack/test/template/date_helper_test.rb | 66 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 34 deletions(-) (limited to 'actionpack/test/template/date_helper_test.rb') diff --git a/actionpack/test/template/date_helper_test.rb b/actionpack/test/template/date_helper_test.rb index 92cdce2e45..59e921f09b 100644 --- a/actionpack/test/template/date_helper_test.rb +++ b/actionpack/test/template/date_helper_test.rb @@ -1726,40 +1726,38 @@ class DateHelperTest < ActionView::TestCase assert_dom_equal expected, datetime_select("post", "updated_at") end - uses_mocha 'TestDatetimeSelectDefaultsToTimeZoneNowWhenConfigTimeZoneIsSet' do - def test_datetime_select_defaults_to_time_zone_now_when_config_time_zone_is_set - time = stub(:year => 2004, :month => 6, :day => 15, :hour => 16, :min => 35, :sec => 0) - time_zone = mock() - time_zone.expects(:now).returns time - Time.zone_default = time_zone - @post = Post.new - - expected = %{\n" - - expected << %{\n" - - expected << %{\n" - - expected << " — " - - expected << %{\n" - expected << " : " - expected << %{\n" - - assert_dom_equal expected, datetime_select("post", "updated_at") - ensure - Time.zone_default = nil - end + def test_datetime_select_defaults_to_time_zone_now_when_config_time_zone_is_set + time = stub(:year => 2004, :month => 6, :day => 15, :hour => 16, :min => 35, :sec => 0) + time_zone = mock() + time_zone.expects(:now).returns time + Time.zone_default = time_zone + @post = Post.new + + expected = %{\n" + + expected << %{\n" + + expected << %{\n" + + expected << " — " + + expected << %{\n" + expected << " : " + expected << %{\n" + + assert_dom_equal expected, datetime_select("post", "updated_at") + ensure + Time.zone_default = nil end def test_datetime_select_with_html_options_within_fields_for -- cgit v1.2.3