From 2adff2751f43d1e7e578ac531c7e909158cc235d Mon Sep 17 00:00:00 2001 From: Matt House Date: Thu, 23 Sep 2010 17:04:06 +0100 Subject: [PATCH] empty tests should flunk by default. --- .../controller/templates/functional_test.rb | 4 ++-- .../integration/templates/integration_test.rb | 4 ++-- .../test_unit/mailer/templates/functional_test.rb | 4 ++-- .../test_unit/model/templates/unit_test.rb | 4 ++-- .../test_unit/observer/templates/unit_test.rb | 4 ++-- .../plugin/templates/%file_name%_test.rb.tt | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb index 0d41858..711482b 100644 --- a/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb +++ b/railties/lib/rails/generators/test_unit/controller/templates/functional_test.rb @@ -3,8 +3,8 @@ require 'test_helper' class <%= class_name %>ControllerTest < ActionController::TestCase <% if actions.empty? -%> # Replace this with your real tests. - test "the truth" do - assert true + test "that unimplemented test flunks" do + flunk end <% else -%> <% for action in actions -%> diff --git a/railties/lib/rails/generators/test_unit/integration/templates/integration_test.rb b/railties/lib/rails/generators/test_unit/integration/templates/integration_test.rb index de08237..b4f36d1 100644 --- a/railties/lib/rails/generators/test_unit/integration/templates/integration_test.rb +++ b/railties/lib/rails/generators/test_unit/integration/templates/integration_test.rb @@ -4,7 +4,7 @@ class <%= class_name %>Test < ActionDispatch::IntegrationTest fixtures :all # Replace this with your real tests. - test "the truth" do - assert true + test "that unimplemented test flunks" do + flunk end end diff --git a/railties/lib/rails/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/mailer/templates/functional_test.rb index 80ac7f0..d8f028f 100644 --- a/railties/lib/rails/generators/test_unit/mailer/templates/functional_test.rb +++ b/railties/lib/rails/generators/test_unit/mailer/templates/functional_test.rb @@ -13,8 +13,8 @@ class <%= class_name %>Test < ActionMailer::TestCase <% end -%> <% if actions.blank? -%> # replace this with your real tests - test "the truth" do - assert true + test "that unimplemented test flunks" do + flunk end <% end -%> end diff --git a/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb b/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb index 3e0bc29..8c602c2 100644 --- a/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb +++ b/railties/lib/rails/generators/test_unit/model/templates/unit_test.rb @@ -2,7 +2,7 @@ require 'test_helper' class <%= class_name %>Test < ActiveSupport::TestCase # Replace this with your real tests. - test "the truth" do - assert true + test "that unimplemented test flunks" do + flunk end end diff --git a/railties/lib/rails/generators/test_unit/observer/templates/unit_test.rb b/railties/lib/rails/generators/test_unit/observer/templates/unit_test.rb index 03f6d56..1207792 100644 --- a/railties/lib/rails/generators/test_unit/observer/templates/unit_test.rb +++ b/railties/lib/rails/generators/test_unit/observer/templates/unit_test.rb @@ -2,7 +2,7 @@ require 'test_helper' class <%= class_name %>ObserverTest < ActiveSupport::TestCase # Replace this with your real tests. - test "the truth" do - assert true + test "that unimplemented test flunks" do + flunk end end diff --git a/railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt b/railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt index 3e0bc29..8c602c2 100644 --- a/railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt +++ b/railties/lib/rails/generators/test_unit/plugin/templates/%file_name%_test.rb.tt @@ -2,7 +2,7 @@ require 'test_helper' class <%= class_name %>Test < ActiveSupport::TestCase # Replace this with your real tests. - test "the truth" do - assert true + test "that unimplemented test flunks" do + flunk end end -- 1.7.0.3