Skip to content
This repository
Browse code

Change all `MiniTest` to `Minitest` since, `MiniTest` namespace has b…

  • Loading branch information...
commit 7bae2921ec51335ec87fde1980a1b568ce37fc1c 1 parent c141dfc
Vipul A M vipulnsward authored
2  actionpack/lib/action_dispatch/testing/assertions/routing.rb
@@ -211,7 +211,7 @@ def recognized_request_for(path, extras = {})
211 211 def fail_on(exception_class)
212 212 yield
213 213 rescue exception_class => e
214   - raise MiniTest::Assertion, e.message
  214 + raise Minitest::Assertion, e.message
215 215 end
216 216 end
217 217 end
2  actionpack/lib/action_dispatch/testing/integration.rb
@@ -137,7 +137,7 @@ def delete_via_redirect(path, parameters = nil, headers_or_env = nil)
137 137 class Session
138 138 DEFAULT_HOST = "www.example.com"
139 139
140   - include MiniTest::Assertions
  140 + include Minitest::Assertions
141 141 include TestProcess, RequestHelpers, Assertions
142 142
143 143 %w( status status_message headers body redirect? ).each do |method|
10 actionpack/test/assertions/response_assertions_test.rb
@@ -19,7 +19,7 @@ def test_assert_response_predicate_methods
19 19 @response = FakeResponse.new sym
20 20 assert_response sym
21 21
22   - assert_raises(MiniTest::Assertion) {
  22 + assert_raises(Minitest::Assertion) {
23 23 assert_response :unauthorized
24 24 }
25 25 end
@@ -29,11 +29,11 @@ def test_assert_response_fixnum
29 29 @response = FakeResponse.new 400
30 30 assert_response 400
31 31
32   - assert_raises(MiniTest::Assertion) {
  32 + assert_raises(Minitest::Assertion) {
33 33 assert_response :unauthorized
34 34 }
35 35
36   - assert_raises(MiniTest::Assertion) {
  36 + assert_raises(Minitest::Assertion) {
37 37 assert_response 500
38 38 }
39 39 end
@@ -42,11 +42,11 @@ def test_assert_response_sym_status
42 42 @response = FakeResponse.new 401
43 43 assert_response :unauthorized
44 44
45   - assert_raises(MiniTest::Assertion) {
  45 + assert_raises(Minitest::Assertion) {
46 46 assert_response :ok
47 47 }
48 48
49   - assert_raises(MiniTest::Assertion) {
  49 + assert_raises(Minitest::Assertion) {
50 50 assert_response :success
51 51 }
52 52 end
2  activerecord/test/cases/migration/change_table_test.rb
@@ -5,7 +5,7 @@ module ActiveRecord
5 5 class Migration
6 6 class TableTest < ActiveRecord::TestCase
7 7 def setup
8   - @connection = MiniTest::Mock.new
  8 + @connection = Minitest::Mock.new
9 9 end
10 10
11 11 def teardown
2  activesupport/test/deprecation_test.rb
@@ -174,7 +174,7 @@ def test_assert_deprecated_matches_any_warning
174 174 ActiveSupport::Deprecation.warn 'abc'
175 175 ActiveSupport::Deprecation.warn 'def'
176 176 end
177   - rescue MiniTest::Assertion
  177 + rescue Minitest::Assertion
178 178 flunk 'assert_deprecated should match any warning in block, not just the last one'
179 179 end
180 180
8 activesupport/test/test_test.rb
@@ -21,10 +21,10 @@ def test_assert_not
21 21 assert_equal true, assert_not(nil)
22 22 assert_equal true, assert_not(false)
23 23
24   - e = assert_raises(MiniTest::Assertion) { assert_not true }
  24 + e = assert_raises(Minitest::Assertion) { assert_not true }
25 25 assert_equal 'Expected true to be nil or false', e.message
26 26
27   - e = assert_raises(MiniTest::Assertion) { assert_not true, 'custom' }
  27 + e = assert_raises(Minitest::Assertion) { assert_not true, 'custom' }
28 28 assert_equal 'custom', e.message
29 29 end
30 30
@@ -73,7 +73,7 @@ def test_array_of_expressions
73 73 end
74 74
75 75 def test_array_of_expressions_identify_failure
76   - assert_raises(MiniTest::Assertion) do
  76 + assert_raises(Minitest::Assertion) do
77 77 assert_difference ['@object.num', '1 + 1'] do
78 78 @object.increment
79 79 end
@@ -81,7 +81,7 @@ def test_array_of_expressions_identify_failure
81 81 end
82 82
83 83 def test_array_of_expressions_identify_failure_when_message_provided
84   - assert_raises(MiniTest::Assertion) do
  84 + assert_raises(Minitest::Assertion) do
85 85 assert_difference ['@object.num', '1 + 1'], 1, 'something went wrong' do
86 86 @object.increment
87 87 end
2  guides/bug_report_templates/action_controller_gem.rb
@@ -29,7 +29,7 @@ def index
29 29 require 'minitest/autorun'
30 30 require 'rack/test'
31 31
32   -class BugTest < MiniTest::Unit::TestCase
  32 +class BugTest < Minitest::Unit::TestCase
33 33 include Rack::Test::Methods
34 34
35 35 def test_returns_success
2  guides/bug_report_templates/active_record_gem.rb
@@ -25,7 +25,7 @@ class Comment < ActiveRecord::Base
25 25 belongs_to :post
26 26 end
27 27
28   -class BugTest < MiniTest::Unit::TestCase
  28 +class BugTest < Minitest::Unit::TestCase
29 29 def test_association_stuff
30 30 post = Post.create!
31 31 post.comments << Comment.create!
2  railties/lib/rails/test_help.rb
@@ -11,7 +11,7 @@
11 11 # Config Rails backtrace in tests.
12 12 require 'rails/backtrace_cleaner'
13 13 if ENV["BACKTRACE"].nil?
14   - MiniTest.backtrace_filter = Rails.backtrace_cleaner
  14 + Minitest.backtrace_filter = Rails.backtrace_cleaner
15 15 end
16 16
17 17 if defined?(ActiveRecord::Base)
4 railties/test/configuration/middleware_stack_proxy_test.rb
@@ -39,7 +39,7 @@ def test_order
39 39 @stack.swap :foo
40 40 @stack.delete :foo
41 41
42   - mock = MiniTest::Mock.new
  42 + mock = Minitest::Mock.new
43 43 mock.expect :send, nil, [:swap, :foo]
44 44 mock.expect :send, nil, [:delete, :foo]
45 45
@@ -50,7 +50,7 @@ def test_order
50 50 private
51 51
52 52 def assert_playback(msg_name, args)
53   - mock = MiniTest::Mock.new
  53 + mock = Minitest::Mock.new
54 54 mock.expect :send, nil, [msg_name, args]
55 55 @stack.merge_into(mock)
56 56 mock.verify

0 comments on commit 7bae292

Please sign in to comment.
Something went wrong with that request. Please try again.