rocket_pants 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rocket_pants/test_helper.rb +13 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 83f96519546c16ade7d8447f2d12e02553e6adb7
|
|
4
|
+
data.tar.gz: 162b8da5912c0eb0f94ccd0167f73aa24ed112eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7752b43465ba01f35e31dd9b3450f4bb372933b6d0e8d864b877cb99f0a2b551cc2d019b843ab965deb281cf00c77dbd6b7264108c52624cc8ff3f9e63931c3f
|
|
7
|
+
data.tar.gz: 7c1363bcdeaa33a1c1b50aa0d06db23a56caeb61dc1feb7099aa808ae898b4a7ddfab192a58dcaeb4105a7305d1ff24202b0eb2f10ff8a75977e0b7939a20553
|
|
@@ -74,8 +74,21 @@ module RocketPants
|
|
|
74
74
|
|
|
75
75
|
protected
|
|
76
76
|
|
|
77
|
+
def insert_action_controller_testing_into_base
|
|
78
|
+
if defined?(ActionController::Testing)
|
|
79
|
+
unless RocketPants::Base < ActionController::Testing
|
|
80
|
+
RocketPants::Base.class_eval do
|
|
81
|
+
include ActionController::Testing
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
|
|
77
87
|
# Like process, but automatically adds the api version.
|
|
78
88
|
def process(action, http_method = 'GET', *args)
|
|
89
|
+
|
|
90
|
+
insert_action_controller_testing_into_base
|
|
91
|
+
|
|
79
92
|
# Rails 4 changes the method signature. In rails 3, http_method is actually
|
|
80
93
|
# the parameters.
|
|
81
94
|
if http_method.kind_of?(String)
|