Froze rails gems
[depot.git] / vendor / rails / railties / lib / rails_generator / generators / components / mailer / templates / unit_test.rb
diff --git a/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb b/vendor/rails/railties/lib/rails_generator/generators/components/mailer/templates/unit_test.rb
new file mode 100644 (file)
index 0000000..4de9407
--- /dev/null
@@ -0,0 +1,20 @@
+require 'test_helper'
+
+class <%= class_name %>Test < ActionMailer::TestCase
+<% for action in actions -%>
+  test "<%= action %>" do
+    @expected.subject = '<%= class_name %>#<%= action %>'
+    @expected.body    = read_fixture('<%= action %>')
+    @expected.date    = Time.now
+
+    assert_equal @expected.encoded, <%= class_name %>.create_<%= action %>(@expected.date).encoded
+  end
+
+<% end -%>
+<% if actions.blank? -%>
+  # replace this with your real tests
+  test "the truth" do
+    assert true
+  end
+<% end -%>
+end