]> projects.mako.cc - selectricity-live/blob - test/unit/voter_notify_test.rb
Merge jdong to pull in new rubyvote
[selectricity-live] / test / unit / voter_notify_test.rb
1 require File.dirname(__FILE__) + '/../test_helper'
2 require 'voter_notify'
3
4 class VoterNotifyTest < Test::Unit::TestCase
5   FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures'
6   CHARSET = "utf-8"
7
8   include ActionMailer::Quoting
9
10   def setup
11     ActionMailer::Base.delivery_method = :test
12     ActionMailer::Base.perform_deliveries = true
13     ActionMailer::Base.deliveries = []
14
15     @expected = TMail::Mail.new
16     @expected.set_content_type "text", "plain", { "charset" => CHARSET }
17   end
18
19   private
20     def read_fixture(action)
21       IO.readlines("#{FIXTURES_PATH}/voter_notify/#{action}")
22     end
23
24     def encode(subject)
25       quoted_printable(subject, CHARSET)
26     end
27 end

Benjamin Mako Hill || Want to submit a patch?