aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/test_unit/generator/templates
diff options
context:
space:
mode:
authorJosef Šimánek <josef.simanek@gmail.com>2013-07-13 12:49:31 +0200
committerJosef Šimánek <josef.simanek@gmail.com>2013-07-16 09:38:13 +0200
commit5ecd125a62da693320da8ea7bbccd60b71f67e63 (patch)
tree2f4c94ce9b995c1762017ad49a85853589da1808 /railties/lib/rails/generators/test_unit/generator/templates
parent8df284a0e9fd075a7e77cbb578532950148d0f24 (diff)
downloadrails-5ecd125a62da693320da8ea7bbccd60b71f67e63.tar.gz
rails-5ecd125a62da693320da8ea7bbccd60b71f67e63.tar.bz2
rails-5ecd125a62da693320da8ea7bbccd60b71f67e63.zip
Added generated unit test for generator generator and new test:generators rake task included in test:all rake task.
Diffstat (limited to 'railties/lib/rails/generators/test_unit/generator/templates')
-rw-r--r--railties/lib/rails/generators/test_unit/generator/templates/generator_test.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/test_unit/generator/templates/generator_test.rb b/railties/lib/rails/generators/test_unit/generator/templates/generator_test.rb
new file mode 100644
index 0000000000..a7f1fc4fba
--- /dev/null
+++ b/railties/lib/rails/generators/test_unit/generator/templates/generator_test.rb
@@ -0,0 +1,16 @@
+require 'test_helper'
+require '<%= generator_path %>'
+
+<% module_namespacing do -%>
+class <%= class_name %>GeneratorTest < Rails::Generators::TestCase
+ tests <%= class_name %>Generator
+ destination Rails.root.join('tmp/generators')
+ setup :prepare_destination
+
+ # test "generator runs without errors" do
+ # assert_nothing_raised do
+ # run_generator ["arguments"]
+ # end
+ # end
+end
+<% end -%>