Skip to content

Commit ff4c9ae

Browse files
committed
Apply linter corrections
1 parent 8e37762 commit ff4c9ae

5 files changed

+8
-8
lines changed

test/adapters/activerecord_trilogy_adapter_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def test_circuit_open_errors_do_not_trigger_the_circuit_breaker
413413
end
414414
error = Semian[:mysql_testing].circuit_breaker.last_error
415415

416-
assert_equal(ActiveRecord::ConnectionNotEstablished, error.class)
416+
assert_instance_of(ActiveRecord::ConnectionNotEstablished, error)
417417
end
418418
end
419419

test/instrumentation_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_success_instrumentation_wait_time
5252
subscription = Semian.subscribe do |*_, wait_time|
5353
hit = true
5454

55-
assert(wait_time.is_a?(Integer))
55+
assert_kind_of(Integer, wait_time)
5656
end
5757
Semian[:testing].acquire {}
5858

test/lru_hash_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def test_monotonically_increasing
179179
previous_timestamp = start_time
180180

181181
lru_hash.keys.zip(lru_hash.values).each do |key, val|
182-
assert(val.updated_at > previous_timestamp, "Timestamp for #{key} was not monotonically increasing")
182+
assert_operator(val.updated_at, :>, previous_timestamp, "Timestamp for #{key} was not monotonically increasing")
183183
end
184184
end
185185

test/resource_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_initialize_with_float
4242
end
4343

4444
def test_max_tickets
45-
assert(Semian::MAX_TICKETS > 0)
45+
assert_operator(Semian::MAX_TICKETS, :>, 0)
4646
end
4747

4848
def test_register

test/time_helper_test.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def test_time_monotonic_travel_past
1010
current = Process.clock_gettime(Process::CLOCK_MONOTONIC)
1111
end
1212

13-
assert(now > current, "now #{now} should be bigger than current #{current}")
13+
assert_operator(now, :>, current, "now #{now} should be bigger than current #{current}")
1414
end
1515

1616
def test_time_monotonic_travel_future
@@ -20,7 +20,7 @@ def test_time_monotonic_travel_future
2020
current = Process.clock_gettime(Process::CLOCK_MONOTONIC)
2121
end
2222

23-
assert(now + 5 < current, "now #{now} should be less than current #{current} at least by 5 secs")
23+
assert_operator(now + 5, :<, current, "now #{now} should be less than current #{current} at least by 5 secs")
2424
end
2525

2626
def test_time_travel_past
@@ -30,7 +30,7 @@ def test_time_travel_past
3030
current = Time.now
3131
end
3232

33-
assert(now > current, "now #{now} should be bigger than current #{current}")
33+
assert_operator(now, :>, current, "now #{now} should be bigger than current #{current}")
3434
end
3535

3636
def test_time_travel_future
@@ -40,6 +40,6 @@ def test_time_travel_future
4040
current = Time.now
4141
end
4242

43-
assert(now + 5 < current, "now #{now} should be less than current #{current} at least by 5 secs")
43+
assert_operator(now + 5, :<, current, "now #{now} should be less than current #{current} at least by 5 secs")
4444
end
4545
end

0 commit comments

Comments
 (0)