66 before :all do
77 Rails . application . routes . append do
88 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'
1119 end
1220 end
1321 Rails . application . reload_routes!
@@ -25,7 +33,8 @@ def response
2533
2634 end
2735
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
2938 layout "application"
3039
3140 include Matestack ::Ui ::Core ::ApplicationHelper
@@ -36,7 +45,7 @@ def example
3645
3746 end
3847
39- visit "render_app_resolving_spec/example "
48+ visit "render_app_resolving_spec/example_a "
4049
4150 # dom structure implies correct rendering with wrapping minimal app
4251 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
7180 end
7281 end
7382
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
7585 layout "application"
7686 include Matestack ::Ui ::Core ::ApplicationHelper
7787
@@ -84,11 +94,11 @@ def second_example
8494 end
8595 end
8696
87- visit "render_app_resolving_spec/example "
97+ visit "render_app_resolving_spec/example_b "
8898 # dom structure implies correct rendering with wrapping specified app
8999 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
90100
91- visit "render_app_resolving_spec/second_example "
101+ visit "render_app_resolving_spec/second_example_b "
92102 # dom structure implies correct rendering with wrapping specified app
93103 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
94104 expect ( text ) . to eq ( "hello from page" )
@@ -122,7 +132,8 @@ def response
122132 end
123133 end
124134
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
126137 include Matestack ::Ui ::Core ::ApplicationHelper
127138 layout "application"
128139 matestack_app ExampleApp ::App
@@ -136,12 +147,12 @@ def second_example
136147 end
137148 end
138149
139- visit "render_app_resolving_spec/example "
150+ visit "render_app_resolving_spec/example_c "
140151 # dom structure implies correct rendering with wrapping specified app
141152 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
142153 expect ( text ) . to eq ( "hello from page" )
143154
144- visit "render_app_resolving_spec/second_example "
155+ visit "render_app_resolving_spec/second_example_c "
145156 # dom structure implies correct rendering with wrapping specified app
146157 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
147158 expect ( text ) . to eq ( "hello from page" )
@@ -158,8 +169,7 @@ def response
158169 end
159170
160171 # 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
163173 include Matestack ::Ui ::Core ::ApplicationHelper
164174 layout "application"
165175
@@ -172,12 +182,12 @@ def second_example
172182 end
173183 end
174184
175- visit "render_app_resolving_spec/example "
185+ visit "render_app_resolving_spec/example_d "
176186 # dom structure implies correct rendering with wrapping specified app
177187 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
178188 expect ( text ) . to eq ( "hello from page" )
179189
180- visit "render_app_resolving_spec/second_example "
190+ visit "render_app_resolving_spec/second_example_d "
181191 # dom structure implies correct rendering without app
182192 text = find ( :xpath , 'id("matestack-ui")/div[@class="matestack-page-root"]/div' ) . text
183193 expect ( text ) . to eq ( "hello from page" )
@@ -224,8 +234,8 @@ def response
224234 end
225235
226236 # 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
229239 include Matestack ::Ui ::Core ::ApplicationHelper
230240 layout "application"
231241
@@ -238,12 +248,12 @@ def second_example
238248 end
239249 end
240250
241- visit "render_app_resolving_spec/example "
251+ visit "render_app_resolving_spec/example_e "
242252 # dom structure implies correct rendering with wrapping specified app
243253 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
244254 expect ( text ) . to eq ( "hello from example page" )
245255
246- visit "render_app_resolving_spec/second_example "
256+ visit "render_app_resolving_spec/second_example_e "
247257 # dom structure implies correct rendering with wrapping specified app
248258 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
249259 expect ( text ) . to eq ( "hello from some other example page" )
0 commit comments