]> git.openstreetmap.org Git - rails.git/commitdiff
count -> size for compatibility with ruby 1.8.6
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Mon, 8 Dec 2008 15:47:29 +0000 (15:47 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Mon, 8 Dec 2008 15:47:29 +0000 (15:47 +0000)
test/functional/amf_controller_test.rb

index 75060b4e201b8977d2cb4d5178cd927b4876787c..b15ae857a01df64e9f43de8c96fffea654c0b79c 100644 (file)
@@ -15,7 +15,7 @@ class AmfControllerTest < ActionController::TestCase
     amf_content "getway", "/1", [id]
     post :amf_read
     assert_response :success
     amf_content "getway", "/1", [id]
     post :amf_read
     assert_response :success
-    amf_parse_response
+    amf_parse_response                                         
     assert_equal amf_result("/1")[0], id
   end
 
     assert_equal amf_result("/1")[0], id
   end
 
@@ -299,15 +299,15 @@ class AmfControllerTest < ActionController::TestCase
     current_node = Node.find(result[2])
     assert_in_delta lat, current_node.lat, 0.00001, "The latitude was not retreieved correctly"
     assert_in_delta lon, current_node.lon, 0.00001, "The longitude was not retreived correctly"
     current_node = Node.find(result[2])
     assert_in_delta lat, current_node.lat, 0.00001, "The latitude was not retreieved correctly"
     assert_in_delta lon, current_node.lon, 0.00001, "The longitude was not retreived correctly"
-    assert_equal 0, current_node.tags.count, "There seems to be a tag that has been added to the node"
+    assert_equal 0, current_node.tags.size, "There seems to be a tag that has been added to the node"
     assert_equal result[3], current_node.version, "The version returned, is different to the one returned by the amf"
     # Now check the history table
     historic_nodes = Node.find(:all, :conditions => { :id => result[2] })
     assert_equal result[3], current_node.version, "The version returned, is different to the one returned by the amf"
     # Now check the history table
     historic_nodes = Node.find(:all, :conditions => { :id => result[2] })
-    assert_equal 1, historic_nodes.count, "There should only be one historic node created"
+    assert_equal 1, historic_nodes.size, "There should only be one historic node created"
     first_historic_node = historic_nodes.first
     assert_in_delta lat, first_historic_node.lat, 0.00001, "The latitude was not retreived correctly"
     assert_in_delta lon, first_historic_node.lon, 0.00001, "The longitude was not retreuved correctly"
     first_historic_node = historic_nodes.first
     assert_in_delta lat, first_historic_node.lat, 0.00001, "The latitude was not retreived correctly"
     assert_in_delta lon, first_historic_node.lon, 0.00001, "The longitude was not retreuved correctly"
-    assert_equal 0, first_historic_node.tags.count, "There seems to be a tag that have been attached to this node"
+    assert_equal 0, first_historic_node.tags.size, "There seems to be a tag that have been attached to this node"
     assert_equal result[3], first_historic_node.version, "The version returned, is different to the one returned by the amf"
     
     ####
     assert_equal result[3], first_historic_node.version, "The version returned, is different to the one returned by the amf"
     
     ####
@@ -338,16 +338,16 @@ class AmfControllerTest < ActionController::TestCase
     current_node = Node.find(result[2])
     assert_in_delta lat, current_node.lat, 0.00001, "The latitude was not retreieved correctly"
     assert_in_delta lon, current_node.lon, 0.00001, "The longitude was not retreived correctly"
     current_node = Node.find(result[2])
     assert_in_delta lat, current_node.lat, 0.00001, "The latitude was not retreieved correctly"
     assert_in_delta lon, current_node.lon, 0.00001, "The longitude was not retreived correctly"
-    assert_equal 2, current_node.tags.count, "There seems to be a tag that has been added to the node"
+    assert_equal 2, current_node.tags.size, "There seems to be a tag that has been added to the node"
     assert_equal({ "key" => "value", "ping" => "pong" }, current_node.tags, "tags are different")
     assert_equal result[3], current_node.version, "The version returned, is different to the one returned by the amf"
     # Now check the history table
     historic_nodes = Node.find(:all, :conditions => { :id => result[2] })
     assert_equal({ "key" => "value", "ping" => "pong" }, current_node.tags, "tags are different")
     assert_equal result[3], current_node.version, "The version returned, is different to the one returned by the amf"
     # Now check the history table
     historic_nodes = Node.find(:all, :conditions => { :id => result[2] })
-    assert_equal 1, historic_nodes.count, "There should only be one historic node created"
+    assert_equal 1, historic_nodes.size, "There should only be one historic node created"
     first_historic_node = historic_nodes.first
     assert_in_delta lat, first_historic_node.lat, 0.00001, "The latitude was not retreived correctly"
     assert_in_delta lon, first_historic_node.lon, 0.00001, "The longitude was not retreuved correctly"
     first_historic_node = historic_nodes.first
     assert_in_delta lat, first_historic_node.lat, 0.00001, "The latitude was not retreived correctly"
     assert_in_delta lon, first_historic_node.lon, 0.00001, "The longitude was not retreuved correctly"
-    assert_equal 2, first_historic_node.tags.count, "There seems to be a tag that have been attached to this node"
+    assert_equal 2, first_historic_node.tags.size, "There seems to be a tag that have been attached to this node"
     assert_equal({ "key" => "value", "ping" => "pong" }, first_historic_node.tags, "tags are different")
     assert_equal result[3], first_historic_node.version, "The version returned, is different to the one returned by the amf"
 
     assert_equal({ "key" => "value", "ping" => "pong" }, first_historic_node.tags, "tags are different")
     assert_equal result[3], first_historic_node.version, "The version returned, is different to the one returned by the amf"