Skip to content

Commit 4b0de74

Browse files
committed
Update coerced_tests format a bit.
1 parent b2b5c45 commit 4b0de74

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

test/cases/coerced_tests.rb

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
class SanitizeTest < ActiveRecord::TestCase
66

77
coerce_tests! :test_sanitize_sql_like_example_use_case
8-
98
def test_sanitize_sql_like_example_use_case_coerced
109
searchable_post = Class.new(Post) do
1110
def self.search(term)
@@ -27,7 +26,6 @@ class YamlSerializationTest < ActiveRecord::TestCase
2726
fixtures :authors
2827

2928
coerce_tests! :test_types_of_virtual_columns_are_not_changed_on_round_trip
30-
3129
def test_types_of_virtual_columns_are_not_changed_on_round_trip_coerced
3230
author = Author.select('authors.*, 5 as posts_count').first
3331
dumped = YAML.load(YAML.dump(author))
@@ -41,27 +39,15 @@ def test_types_of_virtual_columns_are_not_changed_on_round_trip_coerced
4139

4240
module ActiveRecord
4341
module ConnectionAdapters
44-
class TypeLookupTest < ActiveRecord::TestCase
45-
46-
coerce_all_tests! # Just like PostgreSQLAdapter does.
47-
48-
end
49-
end
50-
end
5142

43+
# Just like PostgreSQLAdapter does.
44+
TypeLookupTest.coerce_all_tests! if defined?(TypeLookupTest)
5245

46+
# All sorts of errors due to how we test. Even setting ENV['RAILS_ENV'] to
47+
# a value of 'default_env' will still show tests failing. Just ignoring all
48+
# of them since we have no monkey in this circus.
49+
MergeAndResolveDefaultUrlConfigTest.coerce_all_tests! if defined?(MergeAndResolveDefaultUrlConfigTest)
5350

54-
module ActiveRecord
55-
module ConnectionAdapters
56-
class MergeAndResolveDefaultUrlConfigTest < ActiveRecord::TestCase
57-
58-
# All sorts of errors due to how we test. Even setting ENV['RAILS_ENV'] to
59-
# a value of 'default_env' will still show tests failing. Just ignoring all
60-
# of them since we have no monkey in this circus.
61-
#
62-
coerce_all_tests!
63-
64-
end
6551
end
6652
end
6753

@@ -209,4 +195,3 @@ class RelationTest < ActiveRecord::TestCase
209195

210196
end
211197

212-

0 commit comments

Comments
 (0)