From 045237ff88ffd5f1fe23d9621b043a9e604e54fa Mon Sep 17 00:00:00 2001
From: Azul <azul@leap.se>
Date: Tue, 8 Apr 2014 09:58:41 +0200
Subject: fix requiring core extensions - most tests pass

some message tests are failing for me right now.
---
 lib/extensions/testing.rb | 48 -----------------------------------------------
 1 file changed, 48 deletions(-)
 delete mode 100644 lib/extensions/testing.rb

(limited to 'lib/extensions')

diff --git a/lib/extensions/testing.rb b/lib/extensions/testing.rb
deleted file mode 100644
index 8f7e73c..0000000
--- a/lib/extensions/testing.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-module LeapWebCore
-  module AssertResponses
-
-    # response that works with different TestCases:
-    # ActionController::TestCase has @response
-    # ActionDispatch::IntegrationTest has @response
-    # Rack::Test::Methods defines last_response
-    def get_response
-      @response || last_response
-    end
-
-    def assert_attachement_filename(name)
-      assert_equal %Q(attachment; filename="#{name}"),
-        get_response.headers["Content-Disposition"]
-    end
-
-    def json_response
-      response = JSON.parse(get_response.body)
-      response.respond_to?(:with_indifferent_access) ?
-        response.with_indifferent_access :
-        response
-    end
-
-    def assert_json_response(object)
-      assert_equal 'application/json',
-        get_response.content_type.to_s.split(';').first
-      if object.is_a? Hash
-        object.stringify_keys! if object.respond_to? :stringify_keys!
-        assert_equal object, json_response
-      else
-        assert_equal object.to_json, get_response.body
-      end
-    end
-
-    def assert_json_error(object)
-      object.stringify_keys! if object.respond_to? :stringify_keys!
-      assert_json_response :errors => object
-    end
-  end
-end
-
-class ::ActionController::TestCase
-  include LeapWebCore::AssertResponses
-end
-
-class ::ActionDispatch::IntegrationTest
-  include LeapWebCore::AssertResponses
-end
-- 
cgit v1.2.3