diff options
author | gbuesing <gbuesing@gmail.com> | 2008-09-14 23:07:48 -0500 |
---|---|---|
committer | gbuesing <gbuesing@gmail.com> | 2008-09-14 23:07:48 -0500 |
commit | 157141b2949b845e372ee703bfd6fba3ffb00415 (patch) | |
tree | f061b3c514f54baf7344bb0daedf347b16feb1e6 /activesupport/test | |
parent | cce7ae54663243a224e9871f1aac2388842b0c3a (diff) | |
download | rails-157141b2949b845e372ee703bfd6fba3ffb00415.tar.gz rails-157141b2949b845e372ee703bfd6fba3ffb00415.tar.bz2 rails-157141b2949b845e372ee703bfd6fba3ffb00415.zip |
TimeWithZone #wday, #yday and #to_date avoid trip through #method_missing
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/time_with_zone_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index dc3dee05ce..72b540efe0 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -397,7 +397,7 @@ class TimeWithZoneTest < Test::Unit::TestCase def test_date_part_value_methods silence_warnings do # silence warnings raised by tzinfo gem twz = ActiveSupport::TimeWithZone.new(Time.utc(1999,12,31,19,18,17,500), @time_zone) - twz.stubs(:method_missing).returns(nil) #ensure these methods are defined directly on class + twz.expects(:method_missing).never assert_equal 1999, twz.year assert_equal 12, twz.month assert_equal 31, twz.day @@ -405,6 +405,8 @@ class TimeWithZoneTest < Test::Unit::TestCase assert_equal 18, twz.min assert_equal 17, twz.sec assert_equal 500, twz.usec + assert_equal 5, twz.wday + assert_equal 365, twz.yday end end end |