forked from redsquirrel/mad_mimi_mailer
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test_helper to prepare for multiple test files
- Loading branch information
1 parent
6c9a4d8
commit cce91d9
Showing
2 changed files
with
75 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
require "rubygems" | ||
require "test/unit" | ||
require "mocha" | ||
|
||
require "mad_mimi_mailer" | ||
|
||
MadMimiMailer.api_settings = { | ||
:username => "testy@mctestin.com", | ||
:api_key => "w00tb4r" | ||
} | ||
|
||
class MadMimiMailer | ||
self.template_root = File.dirname(__FILE__) + '/templates/' | ||
|
||
def mimi_hola(greeting) | ||
subject greeting | ||
recipients "tyler@obtiva.com" | ||
from "dave@obtiva.com" | ||
bcc ["Gregg Pollack <gregg@example.com>", "David Clymer <david@example>"] | ||
promotion "hello" | ||
body :message => greeting | ||
end | ||
|
||
def mimi_hello(greeting) | ||
subject greeting | ||
recipients "tyler@obtiva.com" | ||
from "dave@obtiva.com" | ||
bcc ["Gregg Pollack <gregg@example.com>", "David Clymer <david@example>"] | ||
body :message => greeting | ||
end | ||
|
||
def mimi_hello_erb(greeting) | ||
subject greeting | ||
recipients "tyler@obtiva.com" | ||
from "dave@obtiva.com" | ||
promotion "w00t" | ||
use_erb true | ||
body :message => greeting | ||
end | ||
|
||
def mimi_multipart_hello_erb(greeting) | ||
subject greeting | ||
recipients "sandro@hashrocket.com" | ||
from "stephen@hashrocket.com" | ||
promotion "w00t" | ||
use_erb true | ||
body :message => greeting | ||
end | ||
|
||
def mimi_bye_erb(greeting) | ||
subject greeting | ||
recipients "tyler@obtiva.com" | ||
from "dave@obtiva.com" | ||
promotion "w00t" | ||
use_erb true | ||
body :message => greeting | ||
end | ||
|
||
def mimi_hello_sans_bcc(greeting) | ||
subject greeting | ||
recipients "tyler@obtiva.com" | ||
from "dave@obtiva.com" | ||
body :message => greeting | ||
end | ||
|
||
def mimi_unconfirmed(greeting) | ||
subject greeting | ||
recipients 'egunderson@obtiva.com' | ||
from 'mimi@obtiva.com' | ||
promotion 'woot' | ||
body :message => greeting | ||
unconfirmed true | ||
end | ||
end |