mallet 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/mallet/mail.rb +1 -1
- data/lib/mallet/version.rb +1 -1
- data/spec/lib/mallet/mail_spec.rb +8 -2
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/mallet/mail.rb
CHANGED
data/lib/mallet/version.rb
CHANGED
@@ -39,8 +39,11 @@ describe Mallet::Mail do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should trigger sending the mail via delayed job" do
|
42
|
+
mock_mailer = mock(ActionMailer::Base)
|
43
|
+
ActionMailer::Base.should_receive(:welcome).with(@job).and_return(mock_mailer)
|
44
|
+
mock_mailer.should_receive(:deliver)
|
45
|
+
|
42
46
|
Delayed::Job.count.should == 2
|
43
|
-
ActionMailer::Base.should_receive(:welcome).with(@job)
|
44
47
|
Delayed::Job.last.invoke_job
|
45
48
|
end
|
46
49
|
|
@@ -70,7 +73,10 @@ describe Mallet::Mail do
|
|
70
73
|
end
|
71
74
|
|
72
75
|
it "should mark the mail as sent" do
|
73
|
-
ActionMailer::Base
|
76
|
+
mock_mailer = mock(ActionMailer::Base)
|
77
|
+
ActionMailer::Base.should_receive(:welcome).with(@job).and_return(mock_mailer)
|
78
|
+
mock_mailer.should_receive(:deliver)
|
79
|
+
|
74
80
|
Delayed::Job.last.invoke_job
|
75
81
|
@mail.reload
|
76
82
|
@mail.should be_sent
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mallet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-03-
|
13
|
+
date: 2013-03-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|