File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -216,4 +216,19 @@ def test_scaffold_with_namespace_on_revoke
216
216
# Stylesheets (should not be removed)
217
217
assert_file "public/stylesheets/scaffold.css"
218
218
end
219
+
220
+ def test_scaffold_generator_on_revoke_does_not_mutilate_legacy_map_parameter
221
+ run_generator
222
+
223
+ # Add a |map| parameter to the routes block manually
224
+ route_path = File . expand_path ( "config/routes.rb" , destination_root )
225
+ content = File . read ( route_path ) . gsub ( /\. routes\. draw do/ ) do |match |
226
+ "#{ match } |map|"
227
+ end
228
+ File . open ( route_path , "wb" ) { |file | file . write ( content ) }
229
+
230
+ run_generator [ "product_line" ] , :behavior => :revoke
231
+
232
+ assert_file "config/routes.rb" , /\. routes\. draw do\s *\| map\| \s *$/
233
+ end
219
234
end
You can’t perform that action at this time.
0 commit comments