Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

add gemfile to make tests run without having to figure out exact test-unit version #13

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+23 −4
Split
View
@@ -0,0 +1,4 @@
+source :rubygems
+
+gem "rake"
+gem "test-unit", "2.5.2"
View
@@ -0,0 +1,12 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ rake (0.9.2.2)
+ test-unit (2.5.2)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rake
+ test-unit (= 2.5.2)
View
@@ -1,2 +1,3 @@
require File.join(File.dirname(__FILE__), "setup.rb")
+task :default => :test
View
@@ -682,7 +682,7 @@ def exec_test
setup_rb_error 'test/unit cannot loaded. You need Ruby 1.8 or later to invoke this task.'
end
autorunner = Test::Unit::AutoRunner.new(true)
- autorunner.to_run << 'test'
+ autorunner.process_args(["test"])
autorunner.run
else # use testrb
opt = []
View
@@ -1,3 +1,4 @@
+# encoding: utf-8
$:.unshift File.dirname(__FILE__)
require 'test_helper'
require 'tmail'
@@ -693,15 +694,15 @@ def test_insertion_of_headers_and_encoding_them_short
assert_equal("X-Mail-Header: short bit of data\r\n\r\n", mail.encoded)
end
- def test_insertion_of_headers_and_encoding_them_more_than_78_char_total_with_whitespace
+ def test_insertion_of_headers_and_encoding_them_more_than_78_char_total_with_whitespace_1
mail = TMail::Mail.new
mail['X-Ruby-Talk'] = "<11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA 4614-95FD-9071A4BDF4A1@grayproductions.net>"
assert_equal("X-Ruby-Talk: <11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA\r\n\t4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n\r\n", mail.encoded)
result = TMail::Mail.parse(mail.encoded)
assert_equal(mail['X-Ruby-Talk'].to_s, result['X-Ruby-Talk'].to_s)
end
- def test_insertion_of_headers_and_encoding_them_more_than_78_char_total_with_whitespace
+ def test_insertion_of_headers_and_encoding_them_more_than_78_char_total_with_whitespace_2
mail = TMail::Mail.new
mail['X-Ruby-Talk'] = "<11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA 4614-95FD-9071A4BDF4A1@grayproductions.net11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA 4614-95FD-9071A4BDF4A1@grayproductions.net>"
assert_equal("X-Ruby-Talk: <11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA\r\n\t4614-95FD-9071A4BDF4A1@grayproductions.net11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA\r\n\t4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n\r\n", mail.encoded)
View
@@ -1,3 +1,4 @@
+# encoding: utf-8
$:.unshift File.dirname(__FILE__)
require 'test_helper'
require 'tmail'
@@ -634,7 +635,7 @@ def test_body_with_underscores
assert_equal expected, m.body
end
- def test_nested_attachments_are_recognized_correctly
+ def test_nested_attachments_are_recognized_correctly_1
mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email_with_nested_attachment")
assert_equal 2, mail.attachments.length
assert_equal "image/png", mail.attachments.first.content_type