diff options
Diffstat (limited to 'railties/lib/generators/test_unit/observer')
-rw-r--r-- | railties/lib/generators/test_unit/observer/observer_generator.rb | 9 | ||||
-rw-r--r-- | railties/lib/generators/test_unit/observer/templates/unit_test.rb | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/railties/lib/generators/test_unit/observer/observer_generator.rb b/railties/lib/generators/test_unit/observer/observer_generator.rb new file mode 100644 index 0000000000..adfd90a086 --- /dev/null +++ b/railties/lib/generators/test_unit/observer/observer_generator.rb @@ -0,0 +1,9 @@ +module TestUnit + module Generators + class ObserverGenerator < Base + def create_test_files + template 'unit_test.rb', File.join('test', 'unit', class_path, "#{file_name}_observer_test.rb") + end + end + end +end diff --git a/railties/lib/generators/test_unit/observer/templates/unit_test.rb b/railties/lib/generators/test_unit/observer/templates/unit_test.rb new file mode 100644 index 0000000000..03f6d5666e --- /dev/null +++ b/railties/lib/generators/test_unit/observer/templates/unit_test.rb @@ -0,0 +1,8 @@ +require 'test_helper' + +class <%= class_name %>ObserverTest < ActiveSupport::TestCase + # Replace this with your real tests. + test "the truth" do + assert true + end +end |