effective_test_bot 1.1.33 → 1.1.34
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbc62ecd64fb4cb7347234c1d202b2cedaa79f65522d08d3b1cc9c4910b41982
|
4
|
+
data.tar.gz: ad97cd5e6a5102265456a761f92b9923ef1556aa2df9fbc0db0de3c00c35d8dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 259356daa7725ae3cc06eb278904eac48beca8383fbed43db425de744f7980ec7fc2b51f116889124baa6ea4312a4f4e4fe76fce1fae1367ac93dfa5af733c28
|
7
|
+
data.tar.gz: b8bd1757017c4e95d71d49040dd6f18a29bfc45cdc569f726c52315bc0d82bf75e25678de4b1b0dda47debbe4c8888ef1329bc4cc0594cc42420d89580299122
|
@@ -234,13 +234,17 @@ module EffectiveTestBotAssertions
|
|
234
234
|
# assert_email :new_user_sign_up
|
235
235
|
# assert_email :new_user_sign_up, to: 'newuser@example.com'
|
236
236
|
# assert_email from: 'admin@example.com'
|
237
|
-
def assert_email(action = nil, to: nil, from: nil, subject: nil, body: nil, message: nil, &block)
|
237
|
+
def assert_email(action = nil, to: nil, from: nil, subject: nil, body: nil, message: nil, count: nil, &block)
|
238
238
|
if block_given?
|
239
239
|
before = ActionMailer::Base.deliveries.length
|
240
240
|
yield
|
241
|
-
|
241
|
+
difference = (ActionMailer::Base.deliveries.length - before)
|
242
242
|
|
243
|
-
|
243
|
+
if count.present?
|
244
|
+
assert (difference == count), "(assert_email) Expected #{count} email to have been delivered, but #{difference} were instead"
|
245
|
+
else
|
246
|
+
assert (difference > 0), "(assert_email) Expected at least one email to have been delivered"
|
247
|
+
end
|
244
248
|
end
|
245
249
|
|
246
250
|
if (action || to || from || subject || body).nil?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_test_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.34
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|