1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

No such class since 8d2866bb80

This commit is contained in:
Akira Matsuda 2019-08-02 06:18:19 +09:00
parent 89399ed88c
commit dd779c9686
50 changed files with 57 additions and 57 deletions

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "active_support/core_ext/hash/indifferent_access"
require "active_support/hash_with_indifferent_access"
class AttributeAssignmentTest < ActiveModel::TestCase
class AttributeAssignmentTest < ActiveSupport::TestCase
class Model
include ActiveModel::AttributeAssignment

View file

@ -94,7 +94,7 @@ class ModelWithoutAttributesMethod
include ActiveModel::AttributeMethods
end
class AttributeMethodsTest < ActiveModel::TestCase
class AttributeMethodsTest < ActiveSupport::TestCase
test "method missing works correctly even if attributes method is not defined" do
assert_raises(NoMethodError) { ModelWithoutAttributesMethod.new.foo }
end

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "active_model/attribute_set"
module ActiveModel
class AttributeSetTest < ActiveModel::TestCase
class AttributeSetTest < ActiveSupport::TestCase
test "building a new set from raw attributes" do
builder = AttributeSet::Builder.new(foo: Type::Integer.new, bar: Type::Float.new)
attributes = builder.build_from_database(foo: "1.1", bar: "2.2")

View file

@ -3,7 +3,7 @@
require "cases/helper"
module ActiveModel
class AttributeTest < ActiveModel::TestCase
class AttributeTest < ActiveSupport::TestCase
setup do
@type = Minitest::Mock.new
end

View file

@ -2,7 +2,7 @@
require "cases/helper"
class AttributesDirtyTest < ActiveModel::TestCase
class AttributesDirtyTest < ActiveSupport::TestCase
class DirtyModel
include ActiveModel::Model
include ActiveModel::Attributes

View file

@ -3,7 +3,7 @@
require "cases/helper"
module ActiveModel
class AttributesTest < ActiveModel::TestCase
class AttributesTest < ActiveSupport::TestCase
class ModelForAttributesTest
include ActiveModel::Model
include ActiveModel::Attributes

View file

@ -2,7 +2,7 @@
require "cases/helper"
class CallbacksTest < ActiveModel::TestCase
class CallbacksTest < ActiveSupport::TestCase
class CallbackValidator
def around_create(model)
model.callbacks << :before_around_create

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "models/contact"
require "models/helicopter"
class ConversionTest < ActiveModel::TestCase
class ConversionTest < ActiveSupport::TestCase
test "to_model default implementation returns self" do
contact = Contact.new
assert_equal contact, contact.to_model

View file

@ -2,7 +2,7 @@
require "cases/helper"
class DirtyTest < ActiveModel::TestCase
class DirtyTest < ActiveSupport::TestCase
class DirtyModel
include ActiveModel::Dirty
define_attribute_methods :name, :color, :size, :status

View file

@ -3,7 +3,7 @@
require "cases/helper"
require "active_model/error"
class ErrorTest < ActiveModel::TestCase
class ErrorTest < ActiveSupport::TestCase
class Person
extend ActiveModel::Naming
def initialize

View file

@ -3,7 +3,7 @@
require "cases/helper"
require "yaml"
class ErrorsTest < ActiveModel::TestCase
class ErrorsTest < ActiveSupport::TestCase
class Person
extend ActiveModel::Naming
def initialize

View file

@ -2,7 +2,7 @@
require "cases/helper"
class LintTest < ActiveModel::TestCase
class LintTest < ActiveSupport::TestCase
include ActiveModel::Lint::Tests
class CompliantModel

View file

@ -2,7 +2,7 @@
require "cases/helper"
class ModelTest < ActiveModel::TestCase
class ModelTest < ActiveSupport::TestCase
include ActiveModel::Lint::Tests
module DefaultValue

View file

@ -6,7 +6,7 @@ require "models/sheep"
require "models/track_back"
require "models/blog_post"
class NamingTest < ActiveModel::TestCase
class NamingTest < ActiveSupport::TestCase
def setup
@model_name = ActiveModel::Name.new(Post::TrackBack)
end
@ -44,7 +44,7 @@ class NamingTest < ActiveModel::TestCase
end
end
class NamingWithNamespacedModelInIsolatedNamespaceTest < ActiveModel::TestCase
class NamingWithNamespacedModelInIsolatedNamespaceTest < ActiveSupport::TestCase
def setup
@model_name = ActiveModel::Name.new(Blog::Post, Blog)
end
@ -82,7 +82,7 @@ class NamingWithNamespacedModelInIsolatedNamespaceTest < ActiveModel::TestCase
end
end
class NamingWithNamespacedModelInSharedNamespaceTest < ActiveModel::TestCase
class NamingWithNamespacedModelInSharedNamespaceTest < ActiveSupport::TestCase
def setup
@model_name = ActiveModel::Name.new(Blog::Post)
end
@ -120,7 +120,7 @@ class NamingWithNamespacedModelInSharedNamespaceTest < ActiveModel::TestCase
end
end
class NamingWithSuppliedModelNameTest < ActiveModel::TestCase
class NamingWithSuppliedModelNameTest < ActiveSupport::TestCase
def setup
@model_name = ActiveModel::Name.new(Blog::Post, nil, "Article")
end
@ -158,7 +158,7 @@ class NamingWithSuppliedModelNameTest < ActiveModel::TestCase
end
end
class NamingUsingRelativeModelNameTest < ActiveModel::TestCase
class NamingUsingRelativeModelNameTest < ActiveSupport::TestCase
def setup
@model_name = Blog::Post.model_name
end
@ -196,7 +196,7 @@ class NamingUsingRelativeModelNameTest < ActiveModel::TestCase
end
end
class NamingHelpersTest < ActiveModel::TestCase
class NamingHelpersTest < ActiveSupport::TestCase
def setup
@klass = Contact
@record = @klass.new
@ -262,7 +262,7 @@ class NamingHelpersTest < ActiveModel::TestCase
end
end
class NameWithAnonymousClassTest < ActiveModel::TestCase
class NameWithAnonymousClassTest < ActiveSupport::TestCase
def test_anonymous_class_without_name_argument
assert_raises(ArgumentError) do
ActiveModel::Name.new(Class.new)
@ -275,7 +275,7 @@ class NameWithAnonymousClassTest < ActiveModel::TestCase
end
end
class NamingMethodDelegationTest < ActiveModel::TestCase
class NamingMethodDelegationTest < ActiveSupport::TestCase
def test_model_name
assert_equal Blog::Post.model_name, Blog::Post.new.model_name
end

View file

@ -5,7 +5,7 @@ require "active_model/nested_error"
require "models/topic"
require "models/reply"
class NestedErrorTest < ActiveModel::TestCase
class NestedErrorTest < ActiveSupport::TestCase
def test_initialize
topic = Topic.new
inner_error = ActiveModel::Error.new(topic, :title, :not_enough, count: 2)

View file

@ -3,7 +3,7 @@
require "cases/helper"
require "active_support/testing/isolation"
class RailtieTest < ActiveModel::TestCase
class RailtieTest < ActiveSupport::TestCase
include ActiveSupport::Testing::Isolation
def setup

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "models/user"
require "models/visitor"
class SecurePasswordTest < ActiveModel::TestCase
class SecurePasswordTest < ActiveSupport::TestCase
setup do
# Used only to speed up tests
@original_min_cost = ActiveModel::SecurePassword.min_cost

View file

@ -3,7 +3,7 @@
require "cases/helper"
require "active_support/core_ext/object/instance_variables"
class SerializationTest < ActiveModel::TestCase
class SerializationTest < ActiveSupport::TestCase
class User
include ActiveModel::Serialization

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "models/contact"
require "active_support/core_ext/object/instance_variables"
class JsonSerializationTest < ActiveModel::TestCase
class JsonSerializationTest < ActiveSupport::TestCase
def setup
@contact = Contact.new
@contact.name = "Konata Izumi"

View file

@ -3,7 +3,7 @@
require "cases/helper"
require "models/person"
class ActiveModelI18nTests < ActiveModel::TestCase
class ActiveModelI18nTests < ActiveSupport::TestCase
def setup
I18n.backend = I18n::Backend::Simple.new
end

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class BigIntegerTest < ActiveModel::TestCase
class BigIntegerTest < ActiveSupport::TestCase
def test_type_cast_big_integer
type = Type::BigInteger.new
assert_equal 1, type.cast(1)

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class BinaryTest < ActiveModel::TestCase
class BinaryTest < ActiveSupport::TestCase
def test_type_cast_binary
type = Type::Binary.new
assert_nil type.cast(nil)

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class BooleanTest < ActiveModel::TestCase
class BooleanTest < ActiveSupport::TestCase
def test_type_cast_boolean
type = Type::Boolean.new
assert_predicate type.cast(""), :nil?

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class DateTest < ActiveModel::TestCase
class DateTest < ActiveSupport::TestCase
def test_type_cast_date
type = Type::Date.new
assert_nil type.cast(nil)

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class DateTimeTest < ActiveModel::TestCase
class DateTimeTest < ActiveSupport::TestCase
def test_type_cast_datetime_and_timestamp
type = Type::DateTime.new
assert_nil type.cast(nil)

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class DecimalTest < ActiveModel::TestCase
class DecimalTest < ActiveSupport::TestCase
def test_type_cast_decimal
type = Decimal.new
assert_equal BigDecimal("0"), type.cast(BigDecimal("0"))

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class FloatTest < ActiveModel::TestCase
class FloatTest < ActiveSupport::TestCase
def test_type_cast_float
type = Type::Float.new
assert_equal 1.0, type.cast("1")

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class ImmutableStringTest < ActiveModel::TestCase
class ImmutableStringTest < ActiveSupport::TestCase
test "cast strings are frozen" do
s = "foo"
type = Type::ImmutableString.new

View file

@ -5,7 +5,7 @@ require "active_support/core_ext/numeric/time"
module ActiveModel
module Type
class IntegerTest < ActiveModel::TestCase
class IntegerTest < ActiveSupport::TestCase
test "simple values" do
type = Type::Integer.new
assert_nil type.cast("")

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class RegistryTest < ActiveModel::TestCase
class RegistryTest < ActiveSupport::TestCase
test "a class can be registered for a symbol" do
registry = Type::Registry.new
registry.register(:foo, ::String)

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class StringTest < ActiveModel::TestCase
class StringTest < ActiveSupport::TestCase
test "type casting" do
type = Type::String.new
assert_equal "t", type.cast(true)

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class TimeTest < ActiveModel::TestCase
class TimeTest < ActiveSupport::TestCase
def test_type_cast_time
type = Type::Time.new
assert_nil type.cast(nil)

View file

@ -4,7 +4,7 @@ require "cases/helper"
module ActiveModel
module Type
class ValueTest < ActiveModel::TestCase
class ValueTest < ActiveSupport::TestCase
def test_type_equality
assert_equal Type::Value.new, Type::Value.new
assert_not_equal Type::Value.new, Type::Integer.new

View file

@ -5,7 +5,7 @@ require "models/topic"
require "models/person"
require "models/custom_reader"
class AbsenceValidationTest < ActiveModel::TestCase
class AbsenceValidationTest < ActiveSupport::TestCase
teardown do
Topic.clear_validators!
Person.clear_validators!

View file

@ -6,7 +6,7 @@ require "models/topic"
require "models/reply"
require "models/person"
class AcceptanceValidationTest < ActiveModel::TestCase
class AcceptanceValidationTest < ActiveSupport::TestCase
teardown do
self.class.send(:remove_const, :TestClass)
end

View file

@ -85,7 +85,7 @@ class DogValidatorWithIfCondition < Dog
def set_after_validation_marker2; history << "after_validation_marker2" ; end
end
class CallbacksWithMethodNamesShouldBeCalled < ActiveModel::TestCase
class CallbacksWithMethodNamesShouldBeCalled < ActiveSupport::TestCase
def test_if_condition_is_respected_for_before_validation
d = DogValidatorWithIfCondition.new
d.valid?

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "models/topic"
class ConditionalValidationTest < ActiveModel::TestCase
class ConditionalValidationTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -5,7 +5,7 @@ require "cases/helper"
require "models/topic"
require "models/person"
class ConfirmationValidationTest < ActiveModel::TestCase
class ConfirmationValidationTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -6,7 +6,7 @@ require "active_support/core_ext/numeric/time"
require "models/topic"
require "models/person"
class ExclusionValidationTest < ActiveModel::TestCase
class ExclusionValidationTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -5,7 +5,7 @@ require "cases/helper"
require "models/topic"
require "models/person"
class FormatValidationTest < ActiveModel::TestCase
class FormatValidationTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "models/person"
class I18nGenerateMessageValidationTest < ActiveModel::TestCase
class I18nGenerateMessageValidationTest < ActiveSupport::TestCase
def setup
Person.clear_validators!
@person = Person.new

View file

@ -3,7 +3,7 @@
require "cases/helper"
require "models/person"
class I18nValidationTest < ActiveModel::TestCase
class I18nValidationTest < ActiveSupport::TestCase
def setup
Person.clear_validators!
@person = person_class.new

View file

@ -5,7 +5,7 @@ require "cases/helper"
require "models/topic"
require "models/person"
class InclusionValidationTest < ActiveModel::TestCase
class InclusionValidationTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -5,7 +5,7 @@ require "cases/helper"
require "models/topic"
require "models/person"
class LengthValidationTest < ActiveModel::TestCase
class LengthValidationTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -8,7 +8,7 @@ require "models/person"
require "bigdecimal"
require "active_support/core_ext/big_decimal"
class NumericalityValidationTest < ActiveModel::TestCase
class NumericalityValidationTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -6,7 +6,7 @@ require "models/topic"
require "models/person"
require "models/custom_reader"
class PresenceValidationTest < ActiveModel::TestCase
class PresenceValidationTest < ActiveSupport::TestCase
teardown do
Topic.clear_validators!
Person.clear_validators!

View file

@ -6,7 +6,7 @@ require "models/topic"
require "models/person_with_validator"
require "validators/namespace/email_validator"
class ValidatesTest < ActiveModel::TestCase
class ValidatesTest < ActiveSupport::TestCase
setup :reset_callbacks
teardown :reset_callbacks

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "models/topic"
class ValidationsContextTest < ActiveModel::TestCase
class ValidationsContextTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -4,7 +4,7 @@ require "cases/helper"
require "models/topic"
class ValidatesWithTest < ActiveModel::TestCase
class ValidatesWithTest < ActiveSupport::TestCase
def teardown
Topic.clear_validators!
end

View file

@ -9,7 +9,7 @@ require "models/custom_reader"
require "active_support/json"
require "active_support/xml_mini"
class ValidationsTest < ActiveModel::TestCase
class ValidationsTest < ActiveSupport::TestCase
class CustomStrictValidationException < StandardError; end
def teardown