Hi all,
I am attempting to run the rake tests on my app, as I have not as yet
really changed any of the test I am intrigued as to why my notifer test
fails.
This is the test:
require File.dirname(__FILE__) + ''/../test_helper''
require ''notifier''
class 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}/notifier/#{action}")
end
def encode(subject)
quoted_printable(subject, CHARSET)
end
end
This is the output from running rake:
............F.......
Finished in 5.686908 seconds.
1) Failure:
default_test(NotifierTest)
[/usr/lib/ruby/1.8/test/unit/assertions.rb:30:in `assert_block''
/usr/lib/ruby/1.8/test/unit/assertions.rb:28:in `_wrap_assertion''
/usr/lib/ruby/1.8/test/unit/assertions.rb:28:in `assert_block''
/usr/lib/ruby/1.8/test/unit/assertions.rb:225:in `flunk''
/usr/lib/ruby/1.8/test/unit/testcase.rb:99:in `default_test''
/usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `__send__''
/usr/lib/ruby/1.8/test/unit/testcase.rb:70:in `run''
/usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run''
/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each''
/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run''
/usr/lib/ruby/1.8/test/unit/testsuite.rb:32:in `run''
/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `each''
/usr/lib/ruby/1.8/test/unit/testsuite.rb:31:in `run''
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:in
`run_suite''
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:65:in
`start_mediator''
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb:39:in `start''
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb:27:in `run''
/usr/lib/ruby/1.8/test/unit/autorunner.rb:194:in `run''
/usr/lib/ruby/1.8/test/unit/autorunner.rb:14:in `run''
/usr/lib/ruby/1.8/test/unit.rb:285
/usr/lib/ruby/1.8/test/unit.rb:283]:
No tests were specified.
20 tests, 38 assertions, 1 failures, 0 errors
rake aborted!
Command failed with status (1): [ruby18 -Ilib:test
"/usr/lib/ruby/gems/1.8/...]
I am currently only have the sending of notifications new articles /
article edits.
I think I know what I am supposed to do, which is create example emails
from the signup process (using view/user_notify), but what format should
these take?
Cheers
Geoff