mallet 0.0.6 → 0.0.7

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mallet (0.0.5)
4
+ mallet (0.0.6)
5
5
  actionmailer (~> 3.0)
6
6
  activerecord (~> 3.0)
7
7
  activesupport
@@ -43,7 +43,7 @@ module Mallet
43
43
 
44
44
  def deliver
45
45
  validate
46
- mailer_class.constantize.send mailer_method.to_sym, malletable
46
+ mailer_class.constantize.send(mailer_method.to_sym, malletable).deliver
47
47
  end
48
48
 
49
49
  def self.deliver_all!
@@ -1,3 +1,3 @@
1
1
  module Mallet
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -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.should_receive(:welcome).with(@job)
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.6
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-19 00:00:00.000000000 Z
13
+ date: 2013-03-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport