Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.

Commit 2160a36

Browse files
authored
Merge pull request #4122 from zendesk/grosser/rails
remove minitest-rails
2 parents 20bfecc + 4876ddd commit 2160a36

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ group :development, :test do
127127
end
128128

129129
group :test do
130-
gem 'minitest-rails'
131130
gem 'rails-controller-testing'
132131
gem 'maxitest'
133132
gem 'mocha'

Gemfile.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,6 @@ GEM
431431
mini_mime (1.1.5)
432432
mini_portile2 (2.8.7)
433433
minitest (5.14.4)
434-
minitest-rails (6.1.1)
435-
minitest (~> 5.10)
436-
railties (~> 6.1.0)
437434
mixlib-shellout (3.2.7)
438435
chef-utils
439436
mocha (2.1.0)
@@ -715,7 +712,6 @@ DEPENDENCIES
715712
mail (~> 2.7.0)
716713
marco-polo
717714
maxitest
718-
minitest-rails
719715
mocha
720716
momentjs-rails
721717
mysql2

plugins/airbrake/test/samson_airbrake/samson_plugin_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
it 'shows debug info and calls notify_sync if sync is true' do
2525
mock_notice = mock
2626
mock_exception = mock
27-
Airbrake.expects(:notify_sync).with(mock_exception, foo: 'bar').once.returns(mock_notice)
27+
Airbrake.expects(:notify_sync).with(mock_exception, {foo: 'bar'}).once.returns(mock_notice)
2828
SamsonAirbrake::SamsonPlugin.expects(:exception_debug_info).with(mock_notice).once
2929

3030
Samson::Hooks.only_callbacks_for_plugin('airbrake', :error) do
@@ -34,7 +34,7 @@
3434

3535
it 'calls notify if sync is false/nil' do
3636
mock_exception = mock
37-
Airbrake.expects(:notify).with(mock_exception, foo: 'bar').once
37+
Airbrake.expects(:notify).with(mock_exception, {foo: 'bar'}).once
3838

3939
Samson::Hooks.only_callbacks_for_plugin('airbrake', :error) do
4040
Samson::Hooks.fire(:error, mock_exception, foo: 'bar')

test/test_helper.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99
SingleCov.rewrite { |path| path.sub("/lib/decorators/", "/decorators/") }
1010
SingleCov.setup :minitest, branches: true unless defined?(Spring)
1111

12-
# rake adds these, but we don't need them / want to be consistent with using `ruby x_test.rb`
12+
# rake adds these, but we don't need them and want to be consistent with using `ruby x_test.rb`
1313
$LOAD_PATH.delete 'lib'
1414
$LOAD_PATH.delete 'test'
1515

1616
require 'maxitest/global_must'
1717
require_relative '../config/environment'
1818
require 'rails/test_help'
19-
require 'minitest/rails'
2019
require 'rails-controller-testing'
2120
Rails::Controller::Testing.install
2221
require 'maxitest/autorun'
@@ -25,13 +24,16 @@
2524
require 'webmock/minitest'
2625
require 'mocha/minitest'
2726

27+
# Add spec DSL to the TestCase class
28+
ActiveSupport.on_load(:active_support_test_case) { extend Minitest::Spec::DSL }
29+
2830
# Use ActiveSupport::TestCase for everything that was not matched before
2931
MiniTest::Spec::DSL::TYPES[-1] = [//, ActiveSupport::TestCase]
3032

3133
# Use ActionController::TestCase for Controllers
3234
MiniTest::Spec::DSL::TYPES.unshift [/Controller$/, ActionController::TestCase]
3335

34-
# Use ActionDispatch::IntegrationTest for everything that is marked Integration
36+
# Use ActionDispatch::IntegrationTest for everything that is Controller or marked Integration
3537
MiniTest::Spec::DSL::TYPES.unshift [/Integration$/, ActionDispatch::IntegrationTest]
3638

3739
# Use ActionView::TestCase for Helpers
@@ -57,6 +59,8 @@ def capture(into)
5759
include ApplicationHelper
5860
include Warden::Test::Helpers
5961

62+
alias_method :refute_difference, :assert_no_difference
63+
6064
fixtures :all
6165

6266
before { Rails.cache.clear }

0 commit comments

Comments
 (0)