aboutsummaryrefslogtreecommitdiffstats
path: root/test/date/test_date_new.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/date/test_date_new.rb')
-rw-r--r--test/date/test_date_new.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/date/test_date_new.rb b/test/date/test_date_new.rb
index 2a015bf..fe9a631 100644
--- a/test/date/test_date_new.rb
+++ b/test/date/test_date_new.rb
@@ -203,7 +203,6 @@ class TestDateNew < Test::Unit::TestCase
end
def test_weeknum
- skip unless Date.respond_to?(:weeknum, true)
d = Date.__send__(:weeknum)
dt = DateTime.__send__(:weeknum)
assert_equal([-4712, 1, 1], [d.year, d.mon, d.mday])
@@ -223,10 +222,9 @@ class TestDateNew < Test::Unit::TestCase
assert_raise(ArgumentError) do
Date.__send__(:weeknum, 1999,-53,-1, 0)
end
- end
+ end if Date.respond_to?(:weeknum, true)
def test_nth_kday
- skip unless Date.respond_to?(:nth_kday, true)
d = Date.__send__(:nth_kday)
dt = DateTime.__send__(:nth_kday)
assert_equal([-4712, 1, 1], [d.year, d.mon, d.mday])
@@ -246,7 +244,7 @@ class TestDateNew < Test::Unit::TestCase
assert_raise(ArgumentError) do
Date.__send__(:nth_kday, 2006,5, -5,0)
end
- end
+ end if Date.respond_to?(:nth_kday, true)
def test_today
z = Time.now