Permalink
Browse files

Move copy_routes to test_helper

  • Loading branch information...
spastorino committed Jun 29, 2011
1 parent 681b7a2 commit 9d22d76bb29fab3b4b9f17310e25906e79210f75
Showing with 8 additions and 20 deletions.
  1. +0 −10 test/controller_generator_test.rb
  2. +0 −10 test/scaffold_generator_test.rb
  3. +8 −0 test/test_helper.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
@@ -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
@@ -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

0 comments on commit 9d22d76

Please sign in to comment.