Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Ensure spec helper just required once

  • Loading branch information...
commit 80d42446d2d221523b566f071d2a8bcbd757ca1a 1 parent 7f6f153
@mikel authored
View
1  spec/mail/attachments_list_spec.rb
@@ -1,5 +1,4 @@
# encoding: utf-8
-
require 'spec_helper'
def encode_base64(str)
View
31 spec/mail/core_extensions/string_spec.rb
@@ -1,59 +1,60 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+
+require 'spec_helper'
describe 'core_extensions/string' do
-
+
describe "to_crlf" do
-
+
it "should change a single LF to CRLF" do
"\n".to_crlf.should eq "\r\n"
end
-
+
it "should change multiple LF to CRLF" do
"\n\n".to_crlf.should eq "\r\n\r\n"
end
-
+
it "should change a single CR to CRLF" do
"\r".to_crlf.should eq "\r\n"
end
-
+
it "should not change CRLF" do
"\r\n".to_crlf.should eq "\r\n"
end
-
+
it "should not change multiple CRLF" do
"\r\n\r\n".to_crlf.should eq "\r\n\r\n"
end
-
+
it "should handle a mix" do
"\r \n\r\n".to_crlf.should eq "\r\n \r\n\r\n"
end
end
-
+
describe "to_lf" do
it "should change a single CR to LF" do
"\r".to_lf.should eq "\n"
end
-
+
it "should change multiple LF to CRLF" do
"\r\r".to_lf.should eq "\n\n"
end
-
+
it "should change a single CRLF to LF" do
"\r\n".to_lf.should eq "\n"
end
-
+
it "should change multiple CR to LF" do
"\r\n\r\n".to_lf.should eq "\n\n"
end
-
+
it "should not change LF" do
"\n".to_lf.should eq "\n"
end
-
+
it "should not change multiple CRLF" do
"\n\n".to_lf.should eq "\n\n"
end
-
+
it "should handle a mix" do
"\r \n\r\n".to_lf.should eq "\n \n\n"
end
View
2  spec/mail/encoding_spec.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
-require File.join(File.dirname(File.expand_path(__FILE__)), '..', 'spec_helper')
+require 'spec_helper'
describe "mail encoding" do
View
2  spec/matchers_spec.rb
@@ -1,4 +1,4 @@
-require File.join(File.dirname(File.expand_path(__FILE__)), 'spec_helper')
+require 'spec_helper'
describe "have_sent_email" do
include Mail::Matchers
Please sign in to comment.
Something went wrong with that request. Please try again.