public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Added tests [#279 state:resolved] (Nicholas Schlueter)
dhh (author)
Mon Jun 02 20:05:27 -0700 2008
commit  fe4d75b89436edd8887baa828bee8cbc1351b54d
tree    c41f71d56459da6e01b62772e1eb06639a842a5f
parent  4741c983c7440f9d97b8894bf4bc9ada39b257c0
...
222
223
224
 
 
 
 
 
225
226
227
...
222
223
224
225
226
227
228
229
230
231
232
0
@@ -222,6 +222,11 @@ class ArrayToXmlTests < Test::Unit::TestCase
0
 
0
     assert xml.include?(%(<count>2</count>)), xml
0
   end
0
+  
0
+  def test_to_xml_with_empty
0
+    xml = [].to_xml
0
+    assert_match /type="array"\/>/, xml
0
+  end
0
 end
0
 
0
 class ArrayExtractOptionsTests < Test::Unit::TestCase
...
5
6
7
 
8
9
10
...
5
6
7
8
9
10
11
0
@@ -5,5 +5,6 @@ class BigDecimalTest < Test::Unit::TestCase
0
     assert_equal("--- 100000.30020320320000000000000000000000000000001\n", BigDecimal.new('100000.30020320320000000000000000000000000000001').to_yaml)
0
     assert_equal("--- .Inf\n", BigDecimal.new('Infinity').to_yaml)
0
     assert_equal("--- .NaN\n", BigDecimal.new('NaN').to_yaml)
0
+    assert_equal("--- -.Inf\n", BigDecimal.new('-Infinity').to_yaml)
0
   end
0
 end
0
\ No newline at end of file
...
197
198
199
 
 
 
 
200
201
202
...
197
198
199
200
201
202
203
204
205
206
0
@@ -197,6 +197,10 @@ class DateExtCalculationsTest < Test::Unit::TestCase
0
     assert_equal Time.local(2005,2,21,23,59,59), Date.new(2005,2,21).end_of_day
0
   end
0
   
0
+  def test_date_acts_like_date
0
+    assert Date.new.acts_like_date?
0
+  end
0
+  
0
   def test_xmlschema
0
     with_env_tz 'US/Eastern' do
0
       assert_match(/^1980-02-28T00:00:00-05:?00$/, Date.new(1980, 2, 28).xmlschema)

Comments