Skip to content

Commit

Permalink
Support Rails 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bquorning committed Nov 9, 2024
1 parent 7c58b7e commit a184f64
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 48 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ jobs:
fail-fast: false
matrix:
ruby:
- '3.1'
- '3.2'
- '3.3'
gemfile:
- gemfiles/rails-7.2.0.gemfile
- gemfiles/rails-8.0.0.gemfile
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}

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

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

- name: rubocop
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

### 8.0.0 / 2024-10-28

Support Rails 8.0.

### 7.2.0 / 2024-08-30

Support Rails 7.2.
Expand Down
4 changes: 2 additions & 2 deletions 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.2.0"
gem "rails", "~> 8.0.0"
gem "rake"
gem "sqlite3", "~> 1.4"
gem "sqlite3", ">= 2.1"
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.2
Minitest integration for Rails 8.0

[![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.2 you will specify:
For example, if you are using Rails 8.0 you will specify:

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

If you are running Rails 7.2 you will specify:

```ruby
gem "minitest-rails", "~> 7.2.0"
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails-7.2.0.gemfile → gemfiles/rails-8.0.0.gemfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
source "http://rubygems.org"

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

gem "minitest-autotest", "~> 1.1"
gem "minitest-focus", "~> 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.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_no_streams
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream_for
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/Connection/Assertions.html#method-i-assert_reject_connection
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_emails
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcasts
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/TestHelper.html#method-i-assert_no_broadcasts
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/TestHelper.html#method-i-assert_broadcast_on
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_no_streams
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/Channel/TestCase/Behavior.html#method-i-assert_has_stream_for
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionCable/Connection/Assertions.html#method-i-assert_reject_connection
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_emails
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_emails
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_emails
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_enqueued_email_with
# See https://api.rubyonrails.org/v8.0/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.2/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
# See https://api.rubyonrails.org/v8.0/classes/ActionMailer/TestHelper.html#method-i-assert_no_enqueued_emails
#
# :method: wont_have_enqueued_emails
# :call-seq: wont_have_enqueued_emails(&block)
Expand Down
8 changes: 4 additions & 4 deletions lib/minitest/rails/expectations/active_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module ActiveSupport
# end }.must_change "User.count", from: 5, to: 8
#
# See also ActiveSupport::TestCase#assert_difference
# See https://api.rubyonrails.org/v7.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
# See https://api.rubyonrails.org/v8.0/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_changes
#
# :method: must_change
# :args: expression, from: UNTRACKED, to: UNTRACKED
Expand All @@ -27,7 +27,7 @@ module ActiveSupport
# end
#
# See also ActiveSupport::TestCase#assert_difference
# See https://api.rubyonrails.org/v7.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
# See https://api.rubyonrails.org/v8.0/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_changes
#
# :method: wont_change
# :args: expression
Expand All @@ -43,7 +43,7 @@ module ActiveSupport
# end }.must_differ "User.count", 3
#
# See also ActiveSupport::TestCase#assert_difference
# See https://api.rubyonrails.org/v7.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
# See https://api.rubyonrails.org/v8.0/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_difference
#
# :method: must_differ
# :args: expression, *args
Expand All @@ -56,7 +56,7 @@ module ActiveSupport
# value { User.new }.wont_differ "User.count"
#
# See also ActiveSupport::TestCase#refute_difference
# See https://api.rubyonrails.org/v7.2/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
# See https://api.rubyonrails.org/v8.0/classes/ActiveSupport/Testing/Assertions.html#method-i-assert_no_difference
#
# :method: wont_differ
# :args: expression
Expand Down
2 changes: 1 addition & 1 deletion lib/minitest/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Minitest
module Rails
VERSION = "7.2.0".freeze
VERSION = "8.0.0".freeze
end
end
Loading

0 comments on commit a184f64

Please sign in to comment.