@@ -85,14 +85,18 @@ class ::PostsController < ActionController::Base ; end
85
85
image_submit_tag : %r{<input type="image" src="/images/#{ contents } " />}
86
86
}
87
87
88
+ class ::PostsController < ActionController ::Base
89
+ def index
90
+ render params [ :view_method ]
91
+ end
92
+ end
93
+
88
94
cases . each do |( view_method , tag_match ) |
89
- app_file "app/views/posts/index .html.erb" , "<%= #{ view_method } '#{ contents } ', skip_pipeline: true %>"
95
+ app_file "app/views/posts/#{ view_method } .html.erb" , "<%= #{ view_method } '#{ contents } ', skip_pipeline: true %>"
90
96
91
97
app "development"
92
98
93
- class ::PostsController < ActionController ::Base ; end
94
-
95
- get "/posts?debug_assets=true"
99
+ get "/posts?debug_assets=true&view_method=#{ view_method } "
96
100
97
101
body = last_response . body
98
102
assert_match ( tag_match , body , "Expected `#{ view_method } ` to produce a match to #{ tag_match } , but did not: #{ body } " )
@@ -111,14 +115,18 @@ class ::PostsController < ActionController::Base ; end
111
115
stylesheet_url : %r{http://example.org/stylesheets/#{ contents } } ,
112
116
}
113
117
118
+ class ::PostsController < ActionController ::Base
119
+ def index
120
+ render params [ :view_method ]
121
+ end
122
+ end
123
+
114
124
cases . each do |( view_method , tag_match ) |
115
- app_file "app/views/posts/index .html.erb" , "<%= #{ view_method } '#{ contents } ', skip_pipeline: true %>"
125
+ app_file "app/views/posts/#{ view_method } .html.erb" , "<%= #{ view_method } '#{ contents } ', skip_pipeline: true %> "
116
126
117
127
app "development"
118
128
119
- class ::PostsController < ActionController ::Base ; end
120
-
121
- get "/posts?debug_assets=true"
129
+ get "/posts?debug_assets=true&view_method=#{ view_method } "
122
130
123
131
body = last_response . body
124
132
assert_match ( tag_match , body , "Expected `#{ view_method } ` to produce a match to #{ tag_match } , but did not: #{ body } " )
@@ -130,14 +138,19 @@ class ::PostsController < ActionController::Base ; end
130
138
/\/ assets\/ application-.*.\. js/ => { } ,
131
139
/application.js/ => { skip_pipeline : true } ,
132
140
}
133
- cases . each do |( tag_match , options_hash ) |
134
- app_file "app/views/posts/index.html.erb" , "<%= asset_path('application.js', #{ options_hash } ) %>"
135
141
136
- app "development"
142
+ class ::PostsController < ActionController ::Base
143
+ def index
144
+ render params [ :version ]
145
+ end
146
+ end
137
147
138
- class ::PostsController < ActionController ::Base ; end
148
+ cases . each_with_index do |( tag_match , options_hash ) , index |
149
+ app_file "app/views/posts/version_#{ index } .html.erb" , "<%= asset_path('application.js', #{ options_hash } ) %>"
150
+
151
+ app "development"
139
152
140
- get "/posts?debug_assets=true"
153
+ get "/posts?debug_assets=true&version=version_ #{ index } "
141
154
142
155
body = last_response . body . strip
143
156
assert_match ( tag_match , body , "Expected `asset_path` with `#{ options_hash } ` to produce a match to #{ tag_match } , but did not: #{ body } " )
@@ -150,14 +163,18 @@ class ::PostsController < ActionController::Base ; end
150
163
public_compute_asset_path : /application.js/ ,
151
164
}
152
165
166
+ class ::PostsController < ActionController ::Base
167
+ def index
168
+ render params [ :view_method ]
169
+ end
170
+ end
171
+
153
172
cases . each do |( view_method , tag_match ) |
154
- app_file "app/views/posts/index .html.erb" , "<%= #{ view_method } 'application.js' %>"
173
+ app_file "app/views/posts/#{ view_method } .html.erb" , "<%= #{ view_method } 'application.js' %>"
155
174
156
175
app "development"
157
176
158
- class ::PostsController < ActionController ::Base ; end
159
-
160
- get "/posts?debug_assets=true"
177
+ get "/posts?debug_assets=true&view_method=#{ view_method } "
161
178
162
179
body = last_response . body . strip
163
180
assert_match ( tag_match , body , "Expected `#{ view_method } ` to produce a match to #{ tag_match } , but did not: #{ body } " )
0 commit comments