Skip to content

Commit fce62f1

Browse files
committed
Privatize unneededly protected methods in Active Record tests
1 parent 79c17a2 commit fce62f1

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

activerecord/test/cases/adapters/mysql2/connection_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def test_release_non_existent_advisory_lock
186186
"expected release_advisory_lock to return false when there was no lock to release"
187187
end
188188

189-
protected
189+
private
190190

191191
def test_lock_free(lock_name)
192192
@connection.select_value("SELECT IS_FREE_LOCK(#{@connection.quote(lock_name)})") == 1

activerecord/test/cases/adapters/postgresql/connection_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def test_release_non_existent_advisory_lock
245245
end
246246
end
247247

248-
protected
248+
private
249249

250250
def with_warning_suppression
251251
log_level = @connection.client_min_messages

activerecord/test/cases/adapters/postgresql/transaction_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class Sample < ActiveRecord::Base
8989
end
9090
end
9191

92-
protected
92+
private
9393

9494
def with_warning_suppression
9595
log_level = ActiveRecord::Base.connection.client_min_messages

activerecord/test/cases/adapters/sqlite3/copy_table_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_copy_table_with_binary_column
7575
test_copy_table "binaries", "binaries2"
7676
end
7777

78-
protected
78+
private
7979
def copy_table(from, to, options = {})
8080
@connection.copy_table(from, to, { temporary: true }.merge(options))
8181
end

activerecord/test/cases/associations/eager_load_nested_include_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module Remembered
1212

1313
included do
1414
after_create :remember
15-
protected
15+
private
1616
def remember; self.class.remembered << self; end
1717
end
1818

activerecord/test/cases/finder_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ def test_finder_with_offset_string
12201220
assert_equal tyre2, zyke.tyres.custom_find_by(id: tyre2.id)
12211221
end
12221222

1223-
protected
1223+
private
12241224
def table_with_custom_primary_key
12251225
yield(Class.new(Toy) do
12261226
def self.name

activerecord/test/cases/locking_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ def test_no_locks_no_wait
579579
assert first.end > second.end
580580
end
581581

582-
protected
582+
private
583583

584584
def duel(zzz = 5)
585585
t0, t1, t2, t3 = nil, nil, nil, nil

activerecord/test/cases/migration_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def migrate(x)
705705
end
706706
end
707707

708-
protected
708+
private
709709
# This is needed to isolate class_attribute assignments like `table_name_prefix`
710710
# for each test case.
711711
def new_isolated_reminder_class

activerecord/test/models/company_in_module.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class Account < ActiveRecord::Base
8888

8989
validate :check_empty_credit_limit
9090

91-
protected
91+
private
9292

9393
def check_empty_credit_limit
9494
errors.add("credit_card", :blank) if credit_card.blank?

activerecord/test/models/subject.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class Subject < ActiveRecord::Base
55
# as otherwise synonym test was failing
66
after_initialize :set_email_address
77

8-
protected
8+
private
99
def set_email_address
1010
unless persisted?
1111
self.author_email_address = "test@test.com"

0 commit comments

Comments
 (0)