minitest-rails 5.1.0 → 5.2.0

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: b1104f99ae200b725d2b60309b6ee1868f2bf15075386cc16073f39e24d3aaf3
4
- data.tar.gz: c4bda57b55878bcf5fb0a057ca7f7f888b60108eb4ae47d4b1db1098b5ae6d63
3
+ metadata.gz: 8db0986c7b179767d04db55300ab14102d3ff7a40de2c540bede74955eab04a0
4
+ data.tar.gz: 294ad7d63a3e6df1f7c47a8ed393aed664db9e201e20fc21ffe594abb87ae180
5
5
  SHA512:
6
- metadata.gz: f8ba06eab31eeabe204b9fb51e87594d33dd10964f95952510b04dee8089c38b883cd19979d2d6604e296a19a4d9afbec3aee2da33332ead155416465a628288
7
- data.tar.gz: 2d0c87af3c79e3774c1467b9811660ed0c6eef5101f2805d0b93fc90486fce1a2bb8610496db696e0b78dff7a4cb512a684817c7173c6575908603809349b3e9
6
+ metadata.gz: 2d225edae984a6a517cd26ab83fdc9874974c398250372fccf473630aced05b9f9e4615b7c61a15e39f0713a75e93fae854cf79bc87f0acbbdf36e2985cc2fc4
7
+ data.tar.gz: d8f12f12f38d5c82bcc749a2ca036625b75f65d443f79e602d32fcf37a4e416590570d2d0376d23c94a23ee024a2c7f081a5616d67be7311035c478eb5219f0c
@@ -1,5 +1,5 @@
1
1
  # Changes
2
2
 
3
- ### 5.1.0 / upcoming...
3
+ ### 5.2.0 / upcoming...
4
4
 
5
5
  * ...
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # minitest-rails
2
2
 
3
- Minitest integration for Rails 5.1
3
+ Minitest integration for Rails 5.2
4
4
 
5
5
  [![Build Status](https://secure.travis-ci.org/blowmage/minitest-rails.png)](http://travis-ci.org/blowmage/minitest-rails)
6
6
  [![Code Climate](https://codeclimate.com/github/blowmage/minitest-rails.png)](https://codeclimate.com/github/blowmage/minitest-rails)
@@ -21,11 +21,11 @@ Create a new rails app:
21
21
 
22
22
  ### Update Gemfile
23
23
 
24
- This version is for Rails 5.1 applications. Update your application to use the
24
+ This version is for Rails 5.2 applications. Update your application to use the
25
25
  gem by adding the following to your Gemfile:
26
26
 
27
27
  ```ruby
28
- gem "minitest-rails", "~> 5.1.0"
28
+ gem "minitest-rails", "~> 5.2.0"
29
29
  ```
30
30
 
31
31
  ### Installing
@@ -25,7 +25,7 @@ class ActionMailer::TestCase
25
25
  # end
26
26
  #
27
27
  # See also Minitest::Rails::Expectations::ActionMailer#must_have_emails
28
- # See https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html#method-i-assert_emails
28
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_emails
29
29
  #
30
30
  # :method: assert_emails
31
31
  # :call-seq: assert_emails(number, &block)
@@ -51,7 +51,7 @@ class ActionMailer::TestCase
51
51
  # assert_emails 0, &block
52
52
  #
53
53
  # See also Minitest::Rails::Expectations::ActionMailer#wont_have_emails
54
- # See https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
54
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
55
55
  #
56
56
  # :method: refute_emails
57
57
  # :call-seq: refute_emails(&block)
@@ -84,11 +84,49 @@ class ActionMailer::TestCase
84
84
  # end
85
85
  #
86
86
  # See also Minitest::Rails::Expectations::ActionMailer#must_have_enqueued_emails
87
- # See https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
87
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
88
88
  #
89
89
  # :method: assert_enqueued_emails
90
90
  # :call-seq: assert_enqueued_emails(number, &block)
91
91
 
92
+ ##
93
+ # Asserts that a specific email has been enqueued, optionally
94
+ # matching arguments.
95
+ #
96
+ # def test_email
97
+ # ContactMailer.welcome.deliver_later
98
+ # assert_enqueued_email_with ContactMailer, :welcome
99
+ # end
100
+ #
101
+ # def test_email_with_arguments
102
+ # ContactMailer.welcome("Hello", "Goodbye").deliver_later
103
+ # assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"]
104
+ # end
105
+ #
106
+ # If a block is passed, that block should cause the specified email
107
+ # to be enqueued.
108
+ #
109
+ # def test_email_in_block
110
+ # assert_enqueued_email_with ContactMailer, :welcome do
111
+ # ContactMailer.welcome.deliver_later
112
+ # end
113
+ # end
114
+ #
115
+ # If +args+ is provided as a Hash, a parameterized email is matched.
116
+ #
117
+ # def test_parameterized_email
118
+ # assert_enqueued_email_with ContactMailer, :welcome,
119
+ # args: {email: 'user@example.com'} do
120
+ # ContactMailer.with(email: 'user@example.com').welcome.deliver_later
121
+ # end
122
+ # end
123
+ #
124
+ # See also Minitest::Rails::Expectations::ActionMailer#must_enqueue_email_with
125
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with
126
+ #
127
+ # :method: assert_enqueued_email_with
128
+ # :call-seq: assert_enqueued_email_with(mailer, method, args: nil, queue: "mailers", &block)
129
+
92
130
  ##
93
131
  # Asserts that no emails are enqueued for later delivery.
94
132
  #
@@ -107,7 +145,7 @@ class ActionMailer::TestCase
107
145
  # end
108
146
  #
109
147
  # See also Minitest::Rails::Expectations::ActionMailer#wont_have_enqueued_emails
110
- # See https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
148
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
111
149
  #
112
150
  # :method: refute_enqueued_emails
113
151
  # :call-seq: refute_enqueued_emails(&block)
@@ -8,7 +8,7 @@ class ActiveSupport::TestCase
8
8
  # end
9
9
  #
10
10
  # See also Minitest::Rails::Expectations::ActiveSupport#must_change
11
- # See https://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
11
+ # See https://api.rubyonrails.org/v5.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
12
12
  #
13
13
  # :method: assert_changes
14
14
  # :call-seq: assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &block)
@@ -22,7 +22,7 @@ class ActiveSupport::TestCase
22
22
  # end
23
23
  #
24
24
  # See also Minitest::Rails::Expectations::ActiveSupport#wont_change
25
- # See https://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
25
+ # See https://api.rubyonrails.org/v5.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
26
26
  #
27
27
  # :args: expression, message = nil, &block
28
28
  alias refute_changes assert_no_changes
@@ -36,7 +36,7 @@ class ActiveSupport::TestCase
36
36
  # end
37
37
  #
38
38
  # See also Minitest::Rails::Expectations::ActiveSupport#must_change
39
- # See https://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
39
+ # See https://api.rubyonrails.org/v5.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
40
40
  #
41
41
  # :method: assert_difference
42
42
  # :call-seq: assert_difference(expression, *args, &block)
@@ -50,7 +50,7 @@ class ActiveSupport::TestCase
50
50
  # end
51
51
  #
52
52
  # See also Minitest::Rails::Expectations::ActiveSupport#wont_change
53
- # See https://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
53
+ # See https://api.rubyonrails.org/v5.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
54
54
  #
55
55
  # :args: expression, message = nil, &block
56
56
  alias refute_difference assert_no_difference
@@ -30,7 +30,7 @@ module Minitest
30
30
  # end
31
31
  #
32
32
  # See also ActionMailer::TestClass#assert_emails
33
- # See https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html#method-i-assert_emails
33
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_emails
34
34
  #
35
35
  # :method: must_have_emails
36
36
  # :call-seq: must_have_emails(number, &block)
@@ -56,7 +56,7 @@ module Minitest
56
56
  # must_have_emails 0, &block
57
57
  #
58
58
  # See also ActionMailer::TestClass#wont_have_emails
59
- # See https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
59
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
60
60
  #
61
61
  # :method: wont_have_emails
62
62
  # :call-seq: wont_have_emails(&block)
@@ -88,11 +88,49 @@ module Minitest
88
88
  # end
89
89
  #
90
90
  # See also ActionMailer::TestClass#assert_enqueued_emails
91
- # See https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
91
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
92
92
  #
93
93
  # :method: must_have_enqueued_emails
94
94
  # :call-seq: must_have_enqueued_emails(number, &block)
95
95
 
96
+ ##
97
+ # Asserts that a specific email has been enqueued, optionally
98
+ # matching arguments.
99
+ #
100
+ # def test_email
101
+ # ContactMailer.welcome.deliver_later
102
+ # must_enqueue_email_with ContactMailer, :welcome
103
+ # end
104
+ #
105
+ # def test_email_with_arguments
106
+ # ContactMailer.welcome("Hello", "Goodbye").deliver_later
107
+ # must_enqueue_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"]
108
+ # end
109
+ #
110
+ # If a block is passed, that block should cause the specified email
111
+ # to be enqueued.
112
+ #
113
+ # def test_email_in_block
114
+ # must_enqueue_email_with ContactMailer, :welcome do
115
+ # ContactMailer.welcome.deliver_later
116
+ # end
117
+ # end
118
+ #
119
+ # If +args+ is provided as a Hash, a parameterized email is matched.
120
+ #
121
+ # def test_parameterized_email
122
+ # must_enqueue_email_with ContactMailer, :welcome,
123
+ # args: {email: 'user@example.com'} do
124
+ # ContactMailer.with(email: 'user@example.com').welcome.deliver_later
125
+ # end
126
+ # end
127
+ #
128
+ # See also ActionMailer::TestClass#assert_enqueued_email_with
129
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with
130
+ #
131
+ # :method: must_enqueue_email_with
132
+ # :call-seq: must_enqueue_email_with(mailer, method, args: nil, queue: "mailers", &block)
133
+
96
134
  ##
97
135
  # Asserts that no emails are enqueued for later delivery.
98
136
  #
@@ -111,7 +149,7 @@ module Minitest
111
149
  # end
112
150
  #
113
151
  # See also ActionMailer::TestClass#assert_no_enqueued_emails
114
- # See https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
152
+ # See https://api.rubyonrails.org/v5.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
115
153
  #
116
154
  # :method: wont_have_enqueued_emails
117
155
  # :call-seq: wont_have_enqueued_emails(&block)
@@ -122,6 +160,7 @@ module Minitest
122
160
  alias_method :must_have_emails, :assert_emails
123
161
  alias_method :wont_have_emails, :assert_no_emails
124
162
  alias_method :must_have_enqueued_emails, :assert_enqueued_emails
163
+ alias_method :must_enqueue_email_with, :assert_enqueued_email_with
125
164
  alias_method :wont_have_enqueued_emails, :assert_no_enqueued_emails
126
165
  end
127
166
  end
@@ -12,7 +12,7 @@ module Minitest
12
12
  # end }.must_change "User.count", from: 5, to: 8
13
13
  #
14
14
  # See also ActiveSupport::TestCase#assert_difference
15
- # See https://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
15
+ # See https://api.rubyonrails.org/v5.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
16
16
  #
17
17
  # :method: must_change
18
18
  # :args: expression, from: UNTRACKED, to: UNTRACKED
@@ -27,7 +27,7 @@ module Minitest
27
27
  # end
28
28
  #
29
29
  # See also ActiveSupport::TestCase#assert_difference
30
- # See https://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
30
+ # See https://api.rubyonrails.org/v5.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
31
31
  #
32
32
  # :method: wont_change
33
33
  # :args: expression
@@ -43,7 +43,7 @@ module Minitest
43
43
  # end }.must_differ "User.count", 3
44
44
  #
45
45
  # See also ActiveSupport::TestCase#assert_difference
46
- # See https://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
46
+ # See https://api.rubyonrails.org/v5.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
47
47
  #
48
48
  # :method: must_differ
49
49
  # :args: expression, *args
@@ -56,7 +56,7 @@ module Minitest
56
56
  # value { User.new }.wont_differ "User.count"
57
57
  #
58
58
  # See also ActiveSupport::TestCase#refute_difference
59
- # See https://api.rubyonrails.org/v5.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
59
+ # See https://api.rubyonrails.org/v5.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
60
60
  #
61
61
  # :method: wont_differ
62
62
  # :args: expression
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module Rails
3
- VERSION = "5.1.0".freeze
3
+ VERSION = "5.2.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Moore
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 5.1.0
33
+ version: 5.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 5.1.0
40
+ version: 5.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest-autotest
43
43
  requirement: !ruby/object:Gem::Requirement