infopark_rails_connector 6.8.0.beta.200.663.ceecdee → 6.8.0.beta.200.681.7c84f4a
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rails_connector/cms_test_request.rb +15 -0
- metadata +10 -5
@@ -3,6 +3,21 @@ module RailsConnector
|
|
3
3
|
def for_cms_object(test_obj=nil)
|
4
4
|
# prepare the env as if the given obj was loaded by CmsEnv
|
5
5
|
env[RailsConnector::CmsEnv::OBJ_ENV_KEY] = test_obj if test_obj
|
6
|
+
class << self
|
7
|
+
# This special behaviour is necessary for testing controllers that descend from DefaultCmsController.
|
8
|
+
# These controllers do not have explicit routes by default.
|
9
|
+
# Instead, they are reached via the CmsDispatchController.
|
10
|
+
# The TestRequest must therefore use CmsDispatchController as a fallback route.
|
11
|
+
def assign_parameters(routes, controller_path, action, parameters = {})
|
12
|
+
super(routes, controller_path, action, parameters)
|
13
|
+
rescue ActionController::RoutingError, AbstractController::ActionNotFound => e
|
14
|
+
begin
|
15
|
+
super(routes, "rails_connector/cms_dispatch", action, parameters)
|
16
|
+
rescue ActionController::RoutingError, AbstractController::ActionNotFound
|
17
|
+
raise e
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
6
21
|
end
|
7
22
|
end
|
8
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_rails_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 371229963002
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 6
|
@@ -9,9 +9,14 @@ version: !ruby/object:Gem::Version
|
|
9
9
|
- 0
|
10
10
|
- beta
|
11
11
|
- 200
|
12
|
-
-
|
13
|
-
-
|
14
|
-
|
12
|
+
- 681
|
13
|
+
- 7
|
14
|
+
- c
|
15
|
+
- 84
|
16
|
+
- f
|
17
|
+
- 4
|
18
|
+
- a
|
19
|
+
version: 6.8.0.beta.200.681.7c84f4a
|
15
20
|
platform: ruby
|
16
21
|
authors:
|
17
22
|
- Infopark AG
|
@@ -19,7 +24,7 @@ autorequire:
|
|
19
24
|
bindir: bin
|
20
25
|
cert_chain: []
|
21
26
|
|
22
|
-
date: 2012-06-
|
27
|
+
date: 2012-06-26 00:00:00 +02:00
|
23
28
|
default_executable:
|
24
29
|
dependencies:
|
25
30
|
- !ruby/object:Gem::Dependency
|