Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move copy_routes to test_helper

  • Loading branch information...
commit 9d22d76bb29fab3b4b9f17310e25906e79210f75 1 parent 681b7a2
@spastorino authored
View
10 test/controller_generator_test.rb
@@ -16,14 +16,4 @@ def test_assets
assert_no_file "app/assets/javascripts/posts.js"
assert_file "app/assets/javascripts/posts.js.coffee"
end
-
- private
-
- def copy_routes
- routes = File.expand_path("../support/routes.rb", __FILE__)
- destination = File.join(destination_root, "config")
-
- FileUtils.mkdir_p(destination)
- FileUtils.cp routes, destination
- end
end
View
10 test/scaffold_generator_test.rb
@@ -16,14 +16,4 @@ def test_assets
assert_no_file "app/assets/javascripts/posts.js"
assert_file "app/assets/javascripts/posts.js.coffee"
end
-
- private
-
- def copy_routes
- routes = File.expand_path("../support/routes.rb", __FILE__)
- destination = File.join(destination_root, "config")
-
- FileUtils.mkdir_p(destination)
- FileUtils.cp routes, destination
- end
end
View
8 test/test_helper.rb
@@ -7,3 +7,11 @@
# For generators
require 'rails/generators/test_case'
+
+def copy_routes
+ routes = File.expand_path("../support/routes.rb", __FILE__)
+ destination = File.join(destination_root, "config")
+
+ FileUtils.mkdir_p(destination)
+ FileUtils.cp routes, destination
+end
Please sign in to comment.
Something went wrong with that request. Please try again.