capybara-email 2.1.3 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -2
- data/lib/capybara/email/driver.rb +1 -1
- data/lib/capybara/email/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1334373fa11089d316b395332b772b1fcf85f445
|
4
|
+
data.tar.gz: ce0f1ac2ce263ef8bd142672874c383f2b5d01dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d35e28dc8d8152f9b0b30b12daf6594d162d90b73b311ed1b8ef315489a31e679318fd445b356808998ec4a77b0f8664a99fd58059e5e88f09238f87dbf838f7
|
7
|
+
data.tar.gz: 18208a068c0ef83df7e06015173099403dd3d36b8458d184ac9ee33a26487da8470bac1965e45338834edd61114bf499449182c34a30d28bff6925cee5ab572b
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://secure.travis-ci.org/dockyard/capybara-email.png?branch=master)](http://travis-ci.org/dockyard/capybara-email)
|
4
4
|
[![Dependency Status](https://gemnasium.com/dockyard/capybara-email.png?travis)](https://gemnasium.com/dockyard/capybara-email)
|
5
|
-
[![Code Climate](https://
|
5
|
+
[![Code Climate](https://d3s6mut3hikguw.cloudfront.net/github/dockyard/capybara-email.png)](https://codeclimate.com/github/dockyard/capybara-email)
|
6
6
|
|
7
7
|
Easily test [ActionMailer](https://github.com/rails/rails/tree/master/actionmailer) and [Mail](https://github.com/mikel/mail) messages in your Capybara integration tests
|
8
8
|
|
@@ -90,10 +90,16 @@ end
|
|
90
90
|
|
91
91
|
### Test::Unit ###
|
92
92
|
|
93
|
+
Require `capybara/email` at the top of `test/test_helper.rb`
|
94
|
+
|
95
|
+
```ruby
|
96
|
+
require 'capybara/email'
|
97
|
+
```
|
98
|
+
|
93
99
|
Include `Capybara::Email::DSL` in your test class
|
94
100
|
|
95
101
|
```ruby
|
96
|
-
class
|
102
|
+
class ActionDispatch::IntegrationTest
|
97
103
|
include Capybara::Email::DSL
|
98
104
|
end
|
99
105
|
```
|
@@ -128,6 +134,18 @@ class EmailTriggerControllerTest < ActionController::IntegrationTest
|
|
128
134
|
end
|
129
135
|
```
|
130
136
|
|
137
|
+
## Sending Emails with JavaScript ##
|
138
|
+
Sending emails asynchronously will cause `#open_email` to not open the
|
139
|
+
correct email or not find any email at all depending on the state of the
|
140
|
+
email queue. We recommend forcing a sleep prior to trying to read any
|
141
|
+
email after an asynchronous event:
|
142
|
+
|
143
|
+
```ruby
|
144
|
+
click_link 'Send email'
|
145
|
+
sleep 0.1
|
146
|
+
open_email 'test@example.com'
|
147
|
+
```
|
148
|
+
|
131
149
|
## Authors ##
|
132
150
|
|
133
151
|
[Brian Cardarella](http://twitter.com/bcardarella)
|
@@ -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 =~ /\Amultipart\/(alternative|related)\Z/
|
78
|
+
if email.mime_type =~ /\Amultipart\/(alternative|related|mixed)\Z/
|
79
79
|
if email.html_part
|
80
80
|
return email.html_part.body.to_s
|
81
81
|
elsif email.text_part
|
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.
|
4
|
+
version: 2.2.0
|
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-06
|
11
|
+
date: 2013-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.1.5
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Test your ActionMailer and Mailer messages in Capybara
|