aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2006-03-15 23:15:29 +0000
committerMichael Koziarski <michael@koziarski.com>2006-03-15 23:15:29 +0000
commitbf39c39d88712905a18b7be64a80ecc008719e34 (patch)
tree601c67e088df9b62bde1b75b34532364cd245c8d
parent7bbc759dc0b47019972166e08ddabd4a0f4fef34 (diff)
downloadrails-bf39c39d88712905a18b7be64a80ecc008719e34.tar.gz
rails-bf39c39d88712905a18b7be64a80ecc008719e34.tar.bz2
rails-bf39c39d88712905a18b7be64a80ecc008719e34.zip
Time#xmlschema is only available when you've required 'time'. Add a unit test to catch regressions. [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3880 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--activesupport/lib/active_support/core_ext/time/conversions.rb1
-rw-r--r--activesupport/test/core_ext/time_ext_test.rb4
2 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/time/conversions.rb b/activesupport/lib/active_support/core_ext/time/conversions.rb
index 408ff515b3..be8dc0e76f 100644
--- a/activesupport/lib/active_support/core_ext/time/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/time/conversions.rb
@@ -1,4 +1,5 @@
require 'date'
+require 'time'
module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb
index 203f9d1a48..2100409dba 100644
--- a/activesupport/test/core_ext/time_ext_test.rb
+++ b/activesupport/test/core_ext/time_ext_test.rb
@@ -188,4 +188,8 @@ class TimeExtCalculationsTest < Test::Unit::TestCase
def test_last_month_on_31st
assert_equal Time.local(2004, 2, 29), Time.local(2004, 3, 31).last_month
end
+
+ def test_xmlschema_is_available
+ assert_nothing_raised { Time.now.xmlschema }
+ end
end