Permalink
Browse files

Prevent standalone run in Rails

Need to wrap #standalone in a no_tasks block to hide
the method (task) from Thor/Rails.
  • Loading branch information...
1 parent 3e59eb4 commit 5e812f8a92708117dd00d7c0e4913871f065cc1c @elskwid elskwid committed Jan 26, 2013
Showing with 13 additions and 12 deletions.
  1. +13 −12 lib/generators/thincloud/test/test_generator.rb
View
25 lib/generators/thincloud/test/test_generator.rb
@@ -22,26 +22,27 @@ def test
end
# Generates thincloud test infrastructure outside of Rails
- def standalone
- setup_minitest
+ no_tasks do
+ def standalone
+ setup_minitest
- copy_file "support/minitest_reporters.rb",
- "test/support/minitest_reporters.rb"
+ copy_file "support/minitest_reporters.rb",
+ "test/support/minitest_reporters.rb"
- copy_file "test.rake", "lib/tasks/test.rake"
+ copy_file "test.rake", "lib/tasks/test.rake"
- copy_file "Guardfile"
+ copy_file "Guardfile"
- setup_ci
+ setup_ci
- update_gitignore
+ update_gitignore
- say_status "", ""
- say_status "success", "thincloud-test standalone has finished."
- say_status "", "Customize .travis.yml and test/ci/* for your project."
+ say_status "", ""
+ say_status "success", "thincloud-test standalone has finished."
+ say_status "", "Customize .travis.yml and test/ci/* for your project."
+ end
end
-
private
def update_gitignore

0 comments on commit 5e812f8

Please sign in to comment.