Permalink
Browse files

Removing double loading of treetop parsers to remove warnings

  • Loading branch information...
1 parent 56c3e46 commit 1650216237ebecda2274cfe6b165b19929b1eeb0 @mikel committed Nov 18, 2012
@@ -1,11 +1,6 @@
# encoding: utf-8
require 'spec_helper'
-require 'treetop/compiler'
-Treetop.load(File.join(MAIL_ROOT, 'lib/mail/parsers/rfc2822_obsolete'))
-Treetop.load(File.join(MAIL_ROOT, 'lib/mail/parsers/rfc2822'))
-Treetop.load(File.join(MAIL_ROOT, 'lib/mail/parsers/address_lists'))
-
describe "AddressListsParser" do
it "should parse an address" do
text = 'Mikel Lindsaar <test@lindsaar.net>, Friends: test2@lindsaar.net, Ada <test3@lindsaar.net>;'
@@ -1,13 +1,8 @@
# encoding: utf-8
require 'spec_helper'
-require 'treetop/compiler'
-
-Treetop.load(File.join(MAIL_ROOT, 'lib/mail/parsers/rfc2822_obsolete'))
-Treetop.load(File.join(MAIL_ROOT, 'lib/mail/parsers/rfc2822'))
-Treetop.load(File.join(MAIL_ROOT, 'lib/mail/parsers/content_transfer_encoding'))
describe "ContentTransferEncodingParser" do
-
+
it "should work" do
text = "quoted-printable"
a = Mail::ContentTransferEncodingParser.new
@@ -45,7 +40,7 @@
a.parse(text).encoding.text_value.should eq 'quoted-printable'
end
end
-
+
describe "x-token values" do
it "should work" do
text = 'x-my-token'
@@ -54,7 +49,7 @@
a.parse(text).encoding.text_value.should eq 'x-my-token'
end
end
-
+
describe "wild content-transfer-encoding" do
it "should convert 8bits to 8bit" do
text = '8bits'

0 comments on commit 1650216

Please sign in to comment.