6
6
before :all do
7
7
Rails . application . routes . append do
8
8
scope "render_app_resolving_spec" do
9
- get '/example' , to : 'render_test#example'
10
- get '/second_example' , to : 'render_test#second_example'
9
+ get '/example_a' , to : 'render_test_a#example'
10
+ get '/second_example_a' , to : 'render_test_a#second_example'
11
+ get '/example_b' , to : 'render_test_b#example'
12
+ get '/second_example_b' , to : 'render_test_b#second_example'
13
+ get '/example_c' , to : 'render_test_c#example'
14
+ get '/second_example_c' , to : 'render_test_c#second_example'
15
+ get '/example_d' , to : 'render_test_d#example'
16
+ get '/second_example_d' , to : 'render_test_d#second_example'
17
+ get '/example_e' , to : 'render_test_e#example'
18
+ get '/second_example_e' , to : 'render_test_e#second_example'
11
19
end
12
20
end
13
21
Rails . application . reload_routes!
@@ -25,7 +33,8 @@ def response
25
33
26
34
end
27
35
28
- class RenderTestController < ActionController ::Base
36
+ # otherwise the matestack_app_class class var would be set as specified in the former spec
37
+ class RenderTestAController < ActionController ::Base
29
38
layout "application"
30
39
31
40
include Matestack ::Ui ::Core ::ApplicationHelper
@@ -36,7 +45,7 @@ def example
36
45
37
46
end
38
47
39
- visit "render_app_resolving_spec/example "
48
+ visit "render_app_resolving_spec/example_a "
40
49
41
50
# dom structure implies correct rendering with wrapping minimal app
42
51
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]' ) . text
@@ -71,7 +80,8 @@ def response
71
80
end
72
81
end
73
82
74
- class RenderTestController < ActionController ::Base
83
+ # otherwise the matestack_app_class class var would be set as specified in the former spec
84
+ class RenderTestBController < ActionController ::Base
75
85
layout "application"
76
86
include Matestack ::Ui ::Core ::ApplicationHelper
77
87
@@ -84,11 +94,11 @@ def second_example
84
94
end
85
95
end
86
96
87
- visit "render_app_resolving_spec/example "
97
+ visit "render_app_resolving_spec/example_b "
88
98
# dom structure implies correct rendering with wrapping specified app
89
99
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]' ) . text
90
100
91
- visit "render_app_resolving_spec/second_example "
101
+ visit "render_app_resolving_spec/second_example_b "
92
102
# dom structure implies correct rendering with wrapping specified app
93
103
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]' ) . text
94
104
expect ( text ) . to eq ( "hello from page" )
@@ -122,7 +132,8 @@ def response
122
132
end
123
133
end
124
134
125
- class RenderTestController < ActionController ::Base
135
+ # otherwise the matestack_app_class class var would be set as specified in the former spec
136
+ class RenderTestCController < ActionController ::Base
126
137
include Matestack ::Ui ::Core ::ApplicationHelper
127
138
layout "application"
128
139
matestack_app ExampleApp ::App
@@ -136,12 +147,12 @@ def second_example
136
147
end
137
148
end
138
149
139
- visit "render_app_resolving_spec/example "
150
+ visit "render_app_resolving_spec/example_c "
140
151
# dom structure implies correct rendering with wrapping specified app
141
152
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]' ) . text
142
153
expect ( text ) . to eq ( "hello from page" )
143
154
144
- visit "render_app_resolving_spec/second_example "
155
+ visit "render_app_resolving_spec/second_example_c "
145
156
# dom structure implies correct rendering with wrapping specified app
146
157
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]' ) . text
147
158
expect ( text ) . to eq ( "hello from page" )
@@ -158,8 +169,7 @@ def response
158
169
end
159
170
160
171
# otherwise the matestack_app_class class var would be set as specified in the former spec
161
- Object . send ( :remove_const , :RenderTestController ) if defined? ( RenderTestController )
162
- class RenderTestController < ActionController ::Base
172
+ class RenderTestDController < ActionController ::Base
163
173
include Matestack ::Ui ::Core ::ApplicationHelper
164
174
layout "application"
165
175
@@ -172,12 +182,12 @@ def second_example
172
182
end
173
183
end
174
184
175
- visit "render_app_resolving_spec/example "
185
+ visit "render_app_resolving_spec/example_d "
176
186
# dom structure implies correct rendering with wrapping specified app
177
187
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]' ) . text
178
188
expect ( text ) . to eq ( "hello from page" )
179
189
180
- visit "render_app_resolving_spec/second_example "
190
+ visit "render_app_resolving_spec/second_example_d "
181
191
# dom structure implies correct rendering without app
182
192
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-page-root"]/div' ) . text
183
193
expect ( text ) . to eq ( "hello from page" )
@@ -224,8 +234,8 @@ def response
224
234
end
225
235
226
236
# otherwise the matestack_app_class class var would be set as specified in the former spec
227
- Object . send ( :remove_const , :RenderTestController ) if defined? ( RenderTestController )
228
- class RenderTestController < ActionController ::Base
237
+
238
+ class RenderTestEController < ActionController ::Base
229
239
include Matestack ::Ui ::Core ::ApplicationHelper
230
240
layout "application"
231
241
@@ -238,12 +248,12 @@ def second_example
238
248
end
239
249
end
240
250
241
- visit "render_app_resolving_spec/example "
251
+ visit "render_app_resolving_spec/example_e "
242
252
# dom structure implies correct rendering with wrapping specified app
243
253
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]' ) . text
244
254
expect ( text ) . to eq ( "hello from example page" )
245
255
246
- visit "render_app_resolving_spec/second_example "
256
+ visit "render_app_resolving_spec/second_example_e "
247
257
# dom structure implies correct rendering with wrapping specified app
248
258
text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-app-wrapper"]/div[@class="my-other-app-layout"]/div[@class="matestack-page-container"]/div[@class="matestack-page-wrapper"]/div/div[@class="matestack-page-root"]/div[1]' ) . text
249
259
expect ( text ) . to eq ( "hello from some other example page" )
0 commit comments