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: dae0671db7b1a7f8541f4ca3c950ec4a660367481e6651e81de83e5b93f352a6
4
- data.tar.gz: a9311759796dac457296380f53b0842342cbd42dd923afc3813ffcb2ad2ec0e4
3
+ metadata.gz: cbc62ecd64fb4cb7347234c1d202b2cedaa79f65522d08d3b1cc9c4910b41982
4
+ data.tar.gz: ad97cd5e6a5102265456a761f92b9923ef1556aa2df9fbc0db0de3c00c35d8dd
5
5
  SHA512:
6
- metadata.gz: 55b346bda670b8f72f699b2bf485a4ff4aefb68d98645dcead6260b08996396ec6ef35610c1beee2d342743f38753bef525d29b0db7664c20b7b4b5edb7f9e5f
7
- data.tar.gz: 3b722ca2cbfdfec86b07b1ac1795d3300a834a1123797d91072db785a2446f5212a28fcb73a41efdceae14466e5d96221bcfe67b18239f5620837c94db0f3030
6
+ metadata.gz: 259356daa7725ae3cc06eb278904eac48beca8383fbed43db425de744f7980ec7fc2b51f116889124baa6ea4312a4f4e4fe76fce1fae1367ac93dfa5af733c28
7
+ data.tar.gz: b8bd1757017c4e95d71d49040dd6f18a29bfc45cdc569f726c52315bc0d82bf75e25678de4b1b0dda47debbe4c8888ef1329bc4cc0594cc42420d89580299122
@@ -1,3 +1,3 @@
1
1
  module EffectiveTestBot
2
- VERSION = '1.1.33'.freeze
2
+ VERSION = '1.1.34'.freeze
3
3
  end
@@ -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
- after = ActionMailer::Base.deliveries.length
241
+ difference = (ActionMailer::Base.deliveries.length - before)
242
242
 
243
- assert (after - before == 1), "(assert_email) Expected one email to have been delivered"
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.33
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-02 00:00:00.000000000 Z
11
+ date: 2021-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails