Skip to content

Commit fb7ad07

Browse files
committed
Favor ActiveSupport::TestCase over Minitest::Test
- Better minitest 4/5 support - Better DSL - Already available with no changes - Consistent interface PR has one failure until #1384 is merged.
1 parent dff607d commit fb7ad07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+50
-50
lines changed

test/active_model_serializers/logging_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module ActiveModel
44
class Serializer
5-
class LoggingTest < Minitest::Test
5+
class LoggingTest < ActiveSupport::TestCase
66
class TestLogger < ActiveSupport::Logger
77
def initialize
88
@file = StringIO.new

test/active_model_serializers/model_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'test_helper'
22

3-
class ActiveModelSerializers::ModelTest < Minitest::Test
3+
class ActiveModelSerializers::ModelTest < ActiveSupport::TestCase
44
include ActiveModel::Serializer::Lint::Tests
55

66
def setup

test/active_model_serializers/serialization_context_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'test_helper'
22

3-
class ActiveModelSerializers::SerializationContextTest < Minitest::Test
3+
class ActiveModelSerializers::SerializationContextTest < ActiveSupport::TestCase
44
def create_context
55
request = Minitest::Mock.new
66
request.expect(:original_url, 'original_url')

test/active_record_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'test_helper'
22

3-
class ActiveRecordTest < Minitest::Test
3+
class ActiveRecordTest < ActiveSupport::TestCase
44
include ActiveModel::Serializer::Lint::Tests
55

66
def setup

test/adapter/fragment_cache_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
module ActiveModel
33
class Serializer
44
module Adapter
5-
class FragmentCacheTest < Minitest::Test
5+
class FragmentCacheTest < ActiveSupport::TestCase
66
def setup
77
super
88
@spam = Spam::UnrelatedLink.new(id: 'spam-id-1')

test/adapter/json/belongs_to_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module ActiveModel
44
class Serializer
55
module Adapter
66
class Json
7-
class BelongsToTest < Minitest::Test
7+
class BelongsToTest < ActiveSupport::TestCase
88
def setup
99
@post = Post.new(id: 42, title: 'New Post', body: 'Body')
1010
@anonymous_post = Post.new(id: 43, title: 'Hello!!', body: 'Hello, world!!')

test/adapter/json/collection_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module ActiveModel
44
class Serializer
55
module Adapter
66
class Json
7-
class Collection < Minitest::Test
7+
class Collection < ActiveSupport::TestCase
88
def setup
99
@author = Author.new(id: 1, name: 'Steve K.')
1010
@first_post = Post.new(id: 1, title: 'Hello!!', body: 'Hello, world!!')

test/adapter/json/has_many_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module ActiveModel
44
class Serializer
55
module Adapter
66
class Json
7-
class HasManyTestTest < Minitest::Test
7+
class HasManyTestTest < ActiveSupport::TestCase
88
def setup
99
ActionController::Base.cache_store.clear
1010
@author = Author.new(id: 1, name: 'Steve K.')

test/adapter/json_api/belongs_to_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module ActiveModel
44
class Serializer
55
module Adapter
66
class JsonApi
7-
class BelongsToTest < Minitest::Test
7+
class BelongsToTest < ActiveSupport::TestCase
88
def setup
99
@author = Author.new(id: 1, name: 'Steve K.')
1010
@author.bio = nil

test/adapter/json_api/collection_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module ActiveModel
44
class Serializer
55
module Adapter
66
class JsonApi
7-
class CollectionTest < Minitest::Test
7+
class CollectionTest < ActiveSupport::TestCase
88
def setup
99
@author = Author.new(id: 1, name: 'Steve K.')
1010
@author.bio = nil

0 commit comments

Comments
 (0)