active_mailer 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -12,3 +12,4 @@ gem "pry-nav"
12
12
  gem "pry-stack_explorer"
13
13
 
14
14
  gem "wrong"
15
+ gem "factory_girl"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- active_mailer (0.0.4)
4
+ active_mailer (0.0.5)
5
5
  activesupport (~> 3.2)
6
6
  rails (~> 3.2)
7
7
 
@@ -52,6 +52,8 @@ GEM
52
52
  debug_inspector (0.0.2)
53
53
  diff-lcs (1.1.3)
54
54
  erubis (2.7.0)
55
+ factory_girl (4.2.0)
56
+ activesupport (>= 3.0.0)
55
57
  ffi (1.0.11)
56
58
  hike (1.2.1)
57
59
  i18n (0.6.0)
@@ -142,6 +144,7 @@ PLATFORMS
142
144
  DEPENDENCIES
143
145
  active_mailer!
144
146
  capybara (>= 0.4.0)
147
+ factory_girl
145
148
  pry
146
149
  pry-nav
147
150
  pry-rails
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.authors = ["Matt Gordon"]
8
8
  s.email = 'support@expectedbehavior.com'
9
9
  s.files = Dir["{app,lib,config}/**/*"] + ["MIT-LICENSE", "Rakefile", "Gemfile", "README.rdoc"]
10
- s.version = "0.0.5"
10
+ s.version = "0.0.6"
11
11
  s.homepage =
12
12
  'https://github.com/expectedbehavior/active_mailer'
13
13
 
@@ -139,6 +139,10 @@ module ActiveMailer #:nodoc:
139
139
  end
140
140
  end
141
141
 
142
+ def self.layout(*args)
143
+ DefaultActionMailer.send("layout", *args)
144
+ end
145
+
142
146
  def self.mailer_variable(*variable_name)
143
147
  self.mailer_variables = Set.new(variable_name.map(&:to_s)) + (mailer_variables || [])
144
148
  attr_accessor *variable_name
@@ -22,4 +22,12 @@ class ActiveMailerTest < ActiveSupport::TestCase
22
22
  assert { email.send! }
23
23
  assert { email.mailer.subject == email.subject }
24
24
  end
25
+
26
+ test "sends with correct layout" do
27
+ InvitationEmail.layout "email"
28
+ email = create(:invitation_email)
29
+ assert { email.send! }
30
+ actual_layout = ActiveMailer::Base::DefaultActionMailer.instance_variable_get("@_layout")
31
+ assert { "email" == actual_layout }
32
+ end
25
33
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /Users/esquivalient/code/active_mailer
3
3
  specs:
4
- active_mailer (0.0.2)
4
+ active_mailer (0.0.5)
5
5
  activesupport (~> 3.2)
6
6
  rails (~> 3.2)
7
7
 
data/test/test_helper.rb CHANGED
@@ -4,6 +4,10 @@ ENV["RAILS_ENV"] = "test"
4
4
  require File.expand_path("../fixtures/dummyapp_rails_3.2/config/environment.rb", __FILE__)
5
5
  require "rails/test_help"
6
6
 
7
+ require "factory_girl"
8
+ include FactoryGirl::Syntax::Methods
9
+ FactoryGirl.find_definitions
10
+
7
11
  # ActionMailer::Base.delivery_method = :test
8
12
  # ActionMailer::Base.perform_deliveries = true
9
13
  # ActionMailer::Base.default_url_options[:host] = "test.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_mailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-23 00:00:00.000000000 Z
12
+ date: 2013-06-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport