X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/dc635b6d39be19a09a428282b6d639d029908df6..22f84a3ea8bc39eb4cb91575d35dfca683336032:/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier_test.rb diff --git a/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier_test.rb b/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier_test.rb new file mode 100644 index 0000000..20aa05d --- /dev/null +++ b/vendor/plugins/acts_as_authenticated/generators/authenticated_mailer/templates/notifier_test.rb @@ -0,0 +1,27 @@ +require File.dirname(__FILE__) + '/../test_helper' +require '<%= file_name %>_notifier' + +class <%= class_name %>NotifierTest < Test::Unit::TestCase + FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' + CHARSET = "utf-8" + + include ActionMailer::Quoting + + def setup + ActionMailer::Base.delivery_method = :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries = [] + + @expected = TMail::Mail.new + @expected.set_content_type "text", "plain", { "charset" => CHARSET } + end + + private + def read_fixture(action) + IO.readlines("#{FIXTURES_PATH}/<%= file_name %>_notifier/#{action}") + end + + def encode(subject) + quoted_printable(subject, CHARSET) + end +end