From 5ecd125a62da693320da8ea7bbccd60b71f67e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= Date: Sat, 13 Jul 2013 12:49:31 +0200 Subject: Added generated unit test for generator generator and new test:generators rake task included in test:all rake task. --- .../test_unit/generator/templates/generator_test.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 railties/lib/rails/generators/test_unit/generator/templates/generator_test.rb (limited to 'railties/lib/rails/generators/test_unit/generator/templates') 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 -%> -- cgit v1.2.3