Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added tests [#279 state:resolved] (Nicholas Schlueter)

  • Loading branch information...
commit fe4d75b89436edd8887baa828bee8cbc1351b54d 1 parent 4741c98
@dhh dhh authored
View
5 activesupport/test/core_ext/array_ext_test.rb
@@ -222,6 +222,11 @@ def test_to_xml_with_block
assert xml.include?(%(<count>2</count>)), xml
end
+
+ def test_to_xml_with_empty
+ xml = [].to_xml
+ assert_match /type="array"\/>/, xml
+ end
end
class ArrayExtractOptionsTests < Test::Unit::TestCase
View
1  activesupport/test/core_ext/bigdecimal.rb
@@ -5,5 +5,6 @@ def test_to_yaml
assert_equal("--- 100000.30020320320000000000000000000000000000001\n", BigDecimal.new('100000.30020320320000000000000000000000000000001').to_yaml)
assert_equal("--- .Inf\n", BigDecimal.new('Infinity').to_yaml)
assert_equal("--- .NaN\n", BigDecimal.new('NaN').to_yaml)
+ assert_equal("--- -.Inf\n", BigDecimal.new('-Infinity').to_yaml)
end
end
View
4 activesupport/test/core_ext/date_ext_test.rb
@@ -197,6 +197,10 @@ def test_end_of_day
assert_equal Time.local(2005,2,21,23,59,59), Date.new(2005,2,21).end_of_day
end
+ def test_date_acts_like_date
+ assert Date.new.acts_like_date?
+ end
+
def test_xmlschema
with_env_tz 'US/Eastern' do
assert_match(/^1980-02-28T00:00:00-05:?00$/, Date.new(1980, 2, 28).xmlschema)
Please sign in to comment.
Something went wrong with that request. Please try again.