capybara-email 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e7f9209283feaad4cadd2acbad93086e3a7af0b
4
- data.tar.gz: 70c6f5e704d33b1ba76780025450c8676e5ceca7
3
+ metadata.gz: 0626f3d08e976f8048f7a6e341f19c7a4e4eb3d7
4
+ data.tar.gz: efe919321728e942554b529b3be6c405ed24259f
5
5
  SHA512:
6
- metadata.gz: ba8ca1bb57d32befd7800335de0778f5d01decf48c1330f53b2bb38ef2f7bd2361da4b17d48f032107706b3ac0560fbbc7076276b9e906a5965b8869ad1ead99
7
- data.tar.gz: 1f499a962d39b5c5212309779ea39eccd397d36d2d7c2cb7a92c076cda9b32c9690278d0afa3e9f30a8a0d88a7854314db78e5e69982cc59b02a2dc50fc2d888
6
+ metadata.gz: 2b89abafa9a39479af75c5ff83eb2dc9893cac456eaec5eecd3d24bfa84f5e619713749020b5f7545c364c9190a31c4d9165d442e625d2682b2a74d4bca9844a
7
+ data.tar.gz: 848e3b4338d6039ca518649fcdc7d3bb718de3b45cf3862259e6adf34d97be57c21a0ddb9bb460eb9c48d90998148b67c900bcf96c4b6e10688db34a03e201a9
@@ -1,5 +1,14 @@
1
1
  require 'capybara'
2
2
  require 'mail'
3
+
4
+ if defined?(ActionMailer)
5
+ # Rails 4's ActionMailer::Base is autoloaded
6
+ # so in the test suite the Mail constant is not
7
+ # available untl ActionMailer::Base is eval'd
8
+ # So we must eager-load it
9
+ ActionMailer::Base
10
+ end
11
+
3
12
  module Capybara
4
13
  autoload :Email, 'capybara/email'
5
14
  end
@@ -75,7 +75,7 @@ class Capybara::Email::Driver < Capybara::Driver::Base
75
75
  #
76
76
  # @return String
77
77
  def raw
78
- if email.mime_type == 'multipart/alternative'
78
+ if email.mime_type =~ /\Amultipart\/(alternative|related)\Z/
79
79
  if email.html_part
80
80
  return email.html_part.body.to_s
81
81
  elsif email.text_part
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Email
3
- VERSION = '2.1.0'
3
+ VERSION = '2.1.1'
4
4
  end
5
5
  end
@@ -21,6 +21,13 @@ class Capybara::Node::Email < Capybara::Node::Document
21
21
  base.to
22
22
  end
23
23
 
24
+ # Delegate to the email reply_to
25
+ #
26
+ # @return [Mail::Message#reply_to]
27
+ def reply_to
28
+ base.email.reply_to
29
+ end
30
+
24
31
  # Delegate to the email from
25
32
  #
26
33
  # @return [Mail::Message#from]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-email
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Cardarella
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-09 00:00:00.000000000 Z
11
+ date: 2013-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail