Sha256: ef7ef45195287a27a93f0f01b9e92aa6fbf6fd7192cbaced982a182ac403ec07
Contents?: true
Size: 662 Bytes
Versions: 5
Compression:
Stored size: 662 Bytes
Contents
#! /usr/bin/ruby -w TEST_DIR = File.dirname __FILE__ $: << "#{TEST_DIR}/../lib" require 'test/unit' require 'mime' class TestMime < Test::Unit::TestCase # test out the way it partitions a message into parts def test_parsing_no_multipart mime = Mime.new "Header1: Value1\r\nHeader2: Value2\r\n\r\nBody text." assert_equal ['Value1'], mime.headers['Header1'] assert_equal 'Body text.', mime.body assert_equal false, mime.multipart? assert_equal nil, mime.parts # we get round trip conversion. this is mostly fluke, as orderedhash hasn't been # added yet assert_equal "Header1: Value1\r\nHeader2: Value2\r\n\r\nBody text.", mime.to_s end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
ruby-msg-1.2.17.2 | test/test_mime.rb |
ruby-msg-1.2.17.1 | test/test_mime.rb |
ruby-msg-1.2.17 | test/test_mime.rb |
ruby-msg-1.2.17.3 | test/test_mime.rb |
ruby-msg-1.3.1 | test/test_mime.rb |