Skip to content

Commit ccb3cb5

Browse files
Replace ableist language
The word "Crazy" has long been associated with mental illness. While there may be other dictionary definitions, it's difficult for some of us to separate the word from the stigmatization, gaslighting, and bullying that often comes along with it. This commit replaces instances of the word with various alternatives. I find most of these more focused and descriptive than what we had before.
1 parent 10c0b59 commit ccb3cb5

File tree

19 files changed

+49
-49
lines changed

19 files changed

+49
-49
lines changed

actionmailer/test/test_case_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,23 @@ def test_deliveries_are_cleared_on_setup_and_teardown
4343
end
4444
end
4545

46-
class CrazyNameMailerTest < ActionMailer::TestCase
46+
class ManuallySetNameMailerTest < ActionMailer::TestCase
4747
tests TestTestMailer
4848

4949
def test_set_mailer_class_manual
5050
assert_equal TestTestMailer, self.class.mailer_class
5151
end
5252
end
5353

54-
class CrazySymbolNameMailerTest < ActionMailer::TestCase
54+
class ManuallySetSymbolNameMailerTest < ActionMailer::TestCase
5555
tests :test_test_mailer
5656

5757
def test_set_mailer_class_manual_using_symbol
5858
assert_equal TestTestMailer, self.class.mailer_class
5959
end
6060
end
6161

62-
class CrazyStringNameMailerTest < ActionMailer::TestCase
62+
class ManuallySetStringNameMailerTest < ActionMailer::TestCase
6363
tests "test_test_mailer"
6464

6565
def test_set_mailer_class_manual_using_string

actionpack/test/controller/test_case_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,23 +1166,23 @@ def determine_class(name)
11661166
end
11671167
end
11681168

1169-
class CrazyNameTest < ActionController::TestCase
1169+
class ManuallySetNameTest < ActionController::TestCase
11701170
tests ContentController
11711171

11721172
def test_controller_class_can_be_set_manually_not_just_inferred
11731173
assert_equal ContentController, self.class.controller_class
11741174
end
11751175
end
11761176

1177-
class CrazySymbolNameTest < ActionController::TestCase
1177+
class ManuallySetSymbolNameTest < ActionController::TestCase
11781178
tests :content
11791179

11801180
def test_set_controller_class_using_symbol
11811181
assert_equal ContentController, self.class.controller_class
11821182
end
11831183
end
11841184

1185-
class CrazyStringNameTest < ActionController::TestCase
1185+
class ManuallySetStringNameTest < ActionController::TestCase
11861186
tests "content"
11871187

11881188
def test_set_controller_class_using_string

actionpack/test/dispatch/request_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ class RequestFormat < BaseRequestTest
908908

909909
assert_equal [ Mime[:html] ], request.formats
910910

911-
request = stub_request "HTTP_ACCEPT" => "koz-asked/something-crazy",
911+
request = stub_request "HTTP_ACCEPT" => "koz-asked/something-wild",
912912
"QUERY_STRING" => ""
913913

914914
assert_equal [ Mime[:html] ], request.formats

actionview/test/template/test_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,23 @@ def with_test_route_set
6969
end
7070
end
7171

72-
class CrazyHelperTest < ActionView::TestCase
72+
class ManuallySetHelperTest < ActionView::TestCase
7373
tests PeopleHelper
7474

7575
def test_helper_class_can_be_set_manually_not_just_inferred
7676
assert_equal PeopleHelper, self.class.helper_class
7777
end
7878
end
7979

80-
class CrazySymbolHelperTest < ActionView::TestCase
80+
class ManuallySetSymbolHelperTest < ActionView::TestCase
8181
tests :people
8282

8383
def test_set_helper_class_using_symbol
8484
assert_equal PeopleHelper, self.class.helper_class
8585
end
8686
end
8787

88-
class CrazyStringHelperTest < ActionView::TestCase
88+
class ManuallySetStringHelperTest < ActionView::TestCase
8989
tests "people"
9090

9191
def test_set_helper_class_using_string

actionview/test/template/text_helper_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_simple_format_included_in_isolation
3030
def test_simple_format
3131
assert_equal "<p></p>", simple_format(nil)
3232

33-
assert_equal "<p>crazy\n<br /> cross\n<br /> platform linebreaks</p>", simple_format("crazy\r\n cross\r platform linebreaks")
33+
assert_equal "<p>ridiculous\n<br /> cross\n<br /> platform linebreaks</p>", simple_format("ridiculous\r\n cross\r platform linebreaks")
3434
assert_equal "<p>A paragraph</p>\n\n<p>and another one!</p>", simple_format("A paragraph\n\nand another one!")
3535
assert_equal "<p>A paragraph\n<br /> With a newline</p>", simple_format("A paragraph\n With a newline")
3636

activerecord/lib/active_record/associations/through_association.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ def construct_join_attributes(*records)
7474
end
7575
end
7676

77-
# Note: this does not capture all cases, for example it would be crazy to try to
78-
# properly support stale-checking for nested associations.
77+
# Note: this does not capture all cases, for example it would be impractical
78+
# to try to properly support stale-checking for nested associations.
7979
def stale_state
8080
if through_reflection.belongs_to?
8181
owner[through_reflection.foreign_key] && owner[through_reflection.foreign_key].to_s

activerecord/test/cases/associations/eager_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,15 +679,15 @@ def test_eager_with_has_many_and_limit_and_high_offset_and_multiple_array_condit
679679
assert_queries(1) do
680680
posts = Post.references(:authors, :comments).
681681
merge(includes: [ :author, :comments ], limit: 2, offset: 10,
682-
where: [ "authors.name = ? and comments.body = ?", "David", "go crazy" ]).to_a
682+
where: [ "authors.name = ? and comments.body = ?", "David", "go wild" ]).to_a
683683
assert_equal 0, posts.size
684684
end
685685
end
686686

687687
def test_eager_with_has_many_and_limit_and_high_offset_and_multiple_hash_conditions
688688
assert_queries(1) do
689689
posts = Post.all.merge!(includes: [ :author, :comments ], limit: 2, offset: 10,
690-
where: { "authors.name" => "David", "comments.body" => "go crazy" }).to_a
690+
where: { "authors.name" => "David", "comments.body" => "go wild" }).to_a
691691
assert_equal 0, posts.size
692692
end
693693
end

activerecord/test/cases/associations/has_one_through_associations_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,13 @@ def test_has_one_through_nonpreload_eager_loading_through_polymorphic
210210
end
211211

212212
def test_has_one_through_nonpreload_eager_loading_through_polymorphic_with_more_than_one_through_record
213-
Sponsor.new(sponsor_club: clubs(:crazy_club), sponsorable: members(:groucho)).save!
213+
Sponsor.new(sponsor_club: clubs(:outrageous_club), sponsorable: members(:groucho)).save!
214214
members = assert_queries(1) do
215215
Member.all.merge!(includes: :sponsor_club, where: ["members.name = ?", "Groucho Marx"], order: "clubs.name DESC").to_a # force fallback
216216
end
217217
assert_equal 1, members.size
218218
assert_not_nil assert_no_queries { members[0].sponsor_club }
219-
assert_equal clubs(:crazy_club), members[0].sponsor_club
219+
assert_equal clubs(:outrageous_club), members[0].sponsor_club
220220
end
221221

222222
def test_uninitialized_has_one_through_should_return_nil_for_unsaved_record

activerecord/test/cases/query_cache_test.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -688,15 +688,15 @@ def test_clear_query_cache_is_called_on_all_legacy_connections
688688
assert @topic
689689

690690
ActiveRecord::Base.connected_to(role: :writing) do
691-
@topic.title = "It doesn't have to be crazy at work"
691+
@topic.title = "Topic title"
692692
@topic.save!
693693
end
694694

695-
assert_equal "It doesn't have to be crazy at work", @topic.title
695+
assert_equal "Topic title", @topic.title
696696

697697
ActiveRecord::Base.connected_to(role: :reading) do
698698
@topic = Topic.first
699-
assert_equal "It doesn't have to be crazy at work", @topic.title
699+
assert_equal "Topic title", @topic.title
700700
end
701701
}
702702

@@ -724,15 +724,15 @@ def test_clear_query_cache_is_called_on_all_connections
724724
assert @topic
725725

726726
ActiveRecord::Base.connected_to(role: :writing) do
727-
@topic.title = "It doesn't have to be crazy at work"
727+
@topic.title = "Topic title"
728728
@topic.save!
729729
end
730730

731-
assert_equal "It doesn't have to be crazy at work", @topic.title
731+
assert_equal "Topic title", @topic.title
732732

733733
ActiveRecord::Base.connected_to(role: :reading) do
734734
@topic = Topic.first
735-
assert_equal "It doesn't have to be crazy at work", @topic.title
735+
assert_equal "Topic title", @topic.title
736736
end
737737
}
738738

activerecord/test/cases/quoting_test.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_quoted_timestamp_local
6060
end
6161
end
6262

63-
def test_quoted_timestamp_crazy
63+
def test_quoted_timestamp_nonsense
6464
with_timezone_config default: :asdfasdf do
6565
t = Time.now.change(usec: 0)
6666
assert_equal t.getlocal.to_s(:db), @quoter.quoted_date(t)
@@ -115,7 +115,7 @@ def test_quoted_time_dst_local
115115
end
116116
end
117117

118-
def test_quoted_time_crazy
118+
def test_quoted_time_nonsense
119119
with_timezone_config default: :asdfasdf do
120120
t = Time.now.change(usec: 0)
121121

@@ -185,10 +185,10 @@ def test_quoting_classes
185185
assert_equal "'Object'", @quoter.quote(Object)
186186
end
187187

188-
def test_crazy_object
189-
crazy = Object.new
188+
def test_quote_object_instance
189+
object = Object.new
190190
e = assert_raises(TypeError) do
191-
@quoter.quote(crazy)
191+
@quoter.quote(object)
192192
end
193193
assert_equal "can't quote Object", e.message
194194
end

0 commit comments

Comments
 (0)