From 895487c1224bf85047f317e7bddf4f2abdea0822 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Mon, 17 Mar 2008 02:54:23 +0000 Subject: TimeWithZone responds to Ruby 1.9 weekday-named query methods git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9041 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/time_with_zone_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activesupport/test/core_ext/time_with_zone_test.rb') diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb index 5f1a002071..e828e62f9b 100644 --- a/activesupport/test/core_ext/time_with_zone_test.rb +++ b/activesupport/test/core_ext/time_with_zone_test.rb @@ -281,6 +281,13 @@ uses_tzinfo 'TimeWithZoneTest' do assert_equal true, twz.dst? assert_equal 'EDT', twz.zone end + + def test_ruby_19_weekday_name_query_methods + ruby_19_or_greater = RUBY_VERSION >= '1.9' + %w(sunday? monday? tuesday? wednesday? thursday? friday? saturday?).each do |name| + assert_equal ruby_19_or_greater, @twz.respond_to?(name) + end + end end class TimeWithZoneMethodsForTimeAndDateTimeTest < Test::Unit::TestCase -- cgit v1.2.3