Skip to content

Commit

Permalink
Support Rails 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier-thatch committed Aug 30, 2024
1 parent 313cedf commit 7c58b7e
Show file tree
Hide file tree
Showing 16 changed files with 56 additions and 66 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,11 @@ jobs:
fail-fast: false
matrix:
ruby:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
gemfile:
- gemfiles/rails-7.1.0.gemfile
- gemfiles/rails-7.2.0.beta2.gemfile
exclude:
- ruby: '2.7'
gemfile: gemfiles/rails-7.2.0.beta2.gemfile
- ruby: '3.0'
gemfile: gemfiles/rails-7.2.0.beta2.gemfile
- gemfiles/rails-7.2.0.gemfile
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

Expand Down Expand Up @@ -62,7 +54,7 @@ jobs:

- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.1
bundler-cache: true

- name: rubocop
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.1
SuggestExtensions: false
NewCops: enable

Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

### 7.2.0 / 2024-08-30

Support Rails 7.2.

### 7.1.0 / 2023-10-26

Support Rails 7.1.
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ source "http://rubygems.org"
gemspec

gem "irb"
gem "rails", "~> 7.1.0"
gem "rails", "~> 7.2.0"
gem "rake"
gem "sqlite3", "~> 1.4"
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# minitest-rails

Minitest integration for Rails 7.1
Minitest integration for Rails 7.2

[![CI](https://github.com/minitest/minitest-rails/actions/workflows/ci.yml/badge.svg)](https://github.com/minitest/minitest-rails/actions/workflows/ci.yml)
[![CodeQL](https://github.com/minitest/minitest-rails/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/minitest/minitest-rails/actions/workflows/github-code-scanning/codeql)
Expand All @@ -22,7 +22,13 @@ Create a new rails app:
### Choosing a version

This gem follows the versioning of Rails.
For example, if you are using Rails 7.1 you will specify:
For example, if you are using Rails 7.2 you will specify:

```ruby
gem "minitest-rails", "~> 7.2.0"
```

If you are running Rails 7.1 you will specify:

```ruby
gem "minitest-rails", "~> 7.1.0"
Expand Down
12 changes: 0 additions & 12 deletions gemfiles/rails-7.2.0.beta2.gemfile

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source "http://rubygems.org"

gem "minitest-rails", path: "../"
gem "rails", "~> 7.1.0"
gem "rails", "7.2.0"
gem "rake"
gem "sqlite3", "~> 1.4"

Expand Down
20 changes: 10 additions & 10 deletions lib/minitest/rails/assertions/action_cable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ActionCable::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionCable::TestHelper#must_have_broadcasts
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
#
# :method: assert_broadcasts
# :call-seq: assert_broadcasts(stream, number)
Expand All @@ -52,7 +52,7 @@ class ActionCable::TestCase
# assert_broadcasts 'messages', 0, &block
#
# See also Minitest::Rails::Expectations::ActionCable::TestHelper#wont_have_broadcasts
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
#
# :method: refute_broadcasts
# :call-seq: refute_broadcasts(stream, &block)
Expand All @@ -75,7 +75,7 @@ class ActionCable::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionCable::TestHelper#must_broadcast_on
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
#
# :method: assert_broadcast_on
# :call-seq: assert_broadcast_on(stream, data)
Expand Down Expand Up @@ -108,7 +108,7 @@ class ActionCable::Channel::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionCable::TestHelper#must_have_broadcasts
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
#
# :method: assert_broadcasts
# :call-seq: assert_broadcasts(stream, number)
Expand All @@ -135,7 +135,7 @@ class ActionCable::Channel::TestCase
# assert_broadcasts 'messages', 0, &block
#
# See also Minitest::Rails::Expectations::ActionCable::TestHelper#wont_have_broadcasts
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
#
# :method: refute_broadcasts
# :call-seq: refute_broadcasts(stream, &block)
Expand All @@ -158,7 +158,7 @@ class ActionCable::Channel::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionCable::TestHelper#must_broadcast_on
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
#
# :method: assert_broadcast_on
# :call-seq: assert_broadcast_on(stream, data)
Expand All @@ -172,7 +172,7 @@ class ActionCable::Channel::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionCable::Channel#wont_have_streams
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_no_streams
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_no_streams
#
# :method: refute_streams
alias refute_streams assert_no_streams
Expand All @@ -186,7 +186,7 @@ class ActionCable::Channel::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionCable::Channel#must_have_streams
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream
#
# :method: assert_has_stream
# :call-seq: assert_has_stream(stream)
Expand All @@ -200,7 +200,7 @@ class ActionCable::Channel::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionCable::Channel#must_have_stream_for
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream_for
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream_for
#
# :method: assert_has_stream_for
# :call-seq: assert_has_stream_for(object)
Expand All @@ -226,7 +226,7 @@ class ActionCable::Connection::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionCable#must_reject_connection
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/Connection/Assertions.html#method-i-assert_reject_connection
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/Connection/Assertions.html#method-i-assert_reject_connection
#
# :method: assert_reject_connection
end
10 changes: 5 additions & 5 deletions lib/minitest/rails/assertions/action_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ActionMailer::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionMailer#must_have_emails
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_emails
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_emails
#
# :method: assert_emails
# :call-seq: assert_emails(number, &block)
Expand All @@ -51,7 +51,7 @@ class ActionMailer::TestCase
# assert_emails 0, &block
#
# See also Minitest::Rails::Expectations::ActionMailer#wont_have_emails
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
#
# :method: refute_emails
# :call-seq: refute_emails(&block)
Expand Down Expand Up @@ -84,7 +84,7 @@ class ActionMailer::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionMailer#must_have_enqueued_emails
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
#
# :method: assert_enqueued_emails
# :call-seq: assert_enqueued_emails(number, &block)
Expand Down Expand Up @@ -122,7 +122,7 @@ class ActionMailer::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionMailer#must_enqueue_email_with
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with
#
# :method: assert_enqueued_email_with
# :call-seq: assert_enqueued_email_with(mailer, method, args: nil, queue: "mailers", &block)
Expand All @@ -145,7 +145,7 @@ class ActionMailer::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActionMailer#wont_have_enqueued_emails
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
#
# :method: refute_enqueued_emails
# :call-seq: refute_enqueued_emails(&block)
Expand Down
8 changes: 4 additions & 4 deletions lib/minitest/rails/assertions/active_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class ActiveSupport::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActiveSupport#must_change
# See https://api.rubyonrails.org/v7.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
# See https://api.rubyonrails.org/v7.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
#
# :method: assert_changes
# :call-seq: assert_changes(expression, message = nil, from: UNTRACKED, to: UNTRACKED, &block)
Expand All @@ -22,7 +22,7 @@ class ActiveSupport::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActiveSupport#wont_change
# See https://api.rubyonrails.org/v7.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
# See https://api.rubyonrails.org/v7.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
#
# :args: expression, message = nil, &block
alias refute_changes assert_no_changes
Expand All @@ -36,7 +36,7 @@ class ActiveSupport::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActiveSupport#must_change
# See https://api.rubyonrails.org/v7.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
# See https://api.rubyonrails.org/v7.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
#
# :method: assert_difference
# :call-seq: assert_difference(expression, *args, &block)
Expand All @@ -50,7 +50,7 @@ class ActiveSupport::TestCase
# end
#
# See also Minitest::Rails::Expectations::ActiveSupport#wont_change
# See https://api.rubyonrails.org/v7.1/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
# See https://api.rubyonrails.org/v7.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
#
# :args: expression, message = nil, &block
alias refute_difference assert_no_difference
Expand Down
14 changes: 7 additions & 7 deletions lib/minitest/rails/expectations/action_cable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ module TestHelper
# end
#
# See also ActionCable::TestHelper#assert_broadcasts
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
#
# :method: must_have_broadcasts
# :call-seq: must_have_broadcasts(stream, number)
Expand All @@ -58,7 +58,7 @@ module TestHelper
# must_have_broadcasts 'messages', 0, &block
#
# See also ActionCable::TestHelper#wont_have_broadcasts
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
#
# :method: wont_have_broadcasts
# :call-seq: wont_have_broadcasts(stream, &block)
Expand All @@ -80,7 +80,7 @@ module TestHelper
# end
#
# See also ActionCable::TestHelper#assert_broadcast_on
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
#
# :method: must_broadcast_on
# :call-seq: must_broadcast_on(stream, data)
Expand All @@ -104,7 +104,7 @@ module Channel
# end
#
# See also ActionCable::Channel::TestCase#assert_no_streams
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_no_streams
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_no_streams
#
# :method: wont_have_streams

Expand All @@ -117,7 +117,7 @@ module Channel
# end
#
# See also ActionCable::Channel::TestCase#assert_has_stream
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream
#
# :method: must_have_streams
# :call-seq: must_have_streams(stream)
Expand All @@ -131,7 +131,7 @@ module Channel
# end
#
# See also ActionCable::Channel::TestCase#assert_has_stream_for
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream_for
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream_for
#
# :method: must_have_stream_for
# :call-seq: must_have_stream_for(object)
Expand Down Expand Up @@ -166,7 +166,7 @@ module Connection
# end
#
# See also ActionCable::Connection::TestCase#assert_reject_connection
# See https://api.rubyonrails.org/v7.1/classes/ActionCable/Connection/Assertions.html#method-i-assert_reject_connection
# See https://api.rubyonrails.org/v7.2/classes/ActionCable/Connection/Assertions.html#method-i-assert_reject_connection
#
# :method: must_reject_connection

Expand Down
10 changes: 5 additions & 5 deletions lib/minitest/rails/expectations/action_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module ActionMailer
# end
#
# See also ActionMailer::TestClass#assert_emails
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_emails
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_emails
#
# :method: must_have_emails
# :call-seq: must_have_emails(number, &block)
Expand All @@ -56,7 +56,7 @@ module ActionMailer
# must_have_emails 0, &block
#
# See also ActionMailer::TestClass#wont_have_emails
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
#
# :method: wont_have_emails
# :call-seq: wont_have_emails(&block)
Expand Down Expand Up @@ -88,7 +88,7 @@ module ActionMailer
# end
#
# See also ActionMailer::TestClass#assert_enqueued_emails
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
#
# :method: must_have_enqueued_emails
# :call-seq: must_have_enqueued_emails(number, &block)
Expand Down Expand Up @@ -126,7 +126,7 @@ module ActionMailer
# end
#
# See also ActionMailer::TestClass#assert_enqueued_email_with
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with
#
# :method: must_enqueue_email_with
# :call-seq: must_enqueue_email_with(mailer, method, args: nil, queue: "mailers", &block)
Expand All @@ -149,7 +149,7 @@ module ActionMailer
# end
#
# See also ActionMailer::TestClass#assert_no_enqueued_emails
# See https://api.rubyonrails.org/v7.1/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
# See https://api.rubyonrails.org/v7.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
#
# :method: wont_have_enqueued_emails
# :call-seq: wont_have_enqueued_emails(&block)
Expand Down
Loading

0 comments on commit 7c58b7e

Please sign in to comment.