]> git.openstreetmap.org Git - rails.git/blobdiff - test/test_helper.rb
Replace friends fixture with a factory
[rails.git] / test / test_helper.rb
index 15b03b4da1919c24623484c5dd6d3ea6d5eebaf0..419ea18063bd5873197a3c1388fc31932a5f0256 100644 (file)
@@ -8,6 +8,8 @@ load "composite_primary_keys/fixtures.rb"
 
 module ActiveSupport
   class TestCase
+    include FactoryGirl::Syntax::Methods
+
     # Load standard fixtures needed to test API methods
     def self.api_fixtures
       # print "setting up the api_fixtures"
@@ -167,8 +169,8 @@ module ActiveSupport
 
         OSM.http_client = Faraday.new do |builder|
           builder.adapter :test do |stub|
-            stubs.each do |url, body|
-              stub.get(url) { |_env| [200, {}, body] }
+            stubs.each do |url, response|
+              stub.get(url) { |_env| [response["code"], {}, response["body"]] }
             end
           end
         end