mailercity 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/mailercity/version.rb +1 -1
- data/lib/mailercity.rb +1 -1
- data/spec/mailercity_spec.rb +5 -1
- metadata +1 -1
data/lib/mailercity/version.rb
CHANGED
data/lib/mailercity.rb
CHANGED
data/spec/mailercity_spec.rb
CHANGED
@@ -7,7 +7,7 @@ Mailercity.api_key = "testkey"
|
|
7
7
|
describe Mailercity do
|
8
8
|
def stub_post(url, status, *args)
|
9
9
|
payload = {:args => args}
|
10
|
-
body =
|
10
|
+
body = payload.to_json
|
11
11
|
api_key = Mailercity.api_key
|
12
12
|
stub_request(:post, url).
|
13
13
|
with(:body => body, :headers => {'X-Api-Key' => api_key, 'Content-Type' => 'application/json'}).
|
@@ -17,6 +17,10 @@ describe Mailercity do
|
|
17
17
|
let(:user) { {"id"=>1, "email"=>"rob@robforman.com", "first_name"=>"Rob", "last_name"=>"Forman"} }
|
18
18
|
let(:account) { {"id"=>1, "name"=>"Awesometown"} }
|
19
19
|
|
20
|
+
before(:each) do
|
21
|
+
Mailercity.perform_deliveries = true
|
22
|
+
end
|
23
|
+
|
20
24
|
it "can create dynamic mailer classes and template methods while passing appropriate parameters" do
|
21
25
|
mail = Mailercity::MyTestMailer.my_test_template(user)
|
22
26
|
mail.should be_kind_of Mailercity::Message
|