@@ -98,7 +98,7 @@ def test_authorizer_error
9898 def test_authorizer_silent
9999 @db . authorizer { |type , a , b , c , d | 2 }
100100 rows = @db . execute "select * from foo"
101- assert rows . empty?
101+ assert_empty rows
102102 end
103103
104104 def test_prepare_invalid_syntax
@@ -121,22 +121,22 @@ def test_prepare_invalid_table
121121
122122 def test_prepare_no_block
123123 stmt = @db . prepare "select * from foo"
124- assert stmt . respond_to? ( :execute )
124+ assert_respond_to stmt , :execute
125125 stmt . close
126126 end
127127
128128 def test_prepare_with_block
129129 called = false
130130 @db . prepare "select * from foo" do |stmt |
131131 called = true
132- assert stmt . respond_to? ( :execute )
132+ assert_respond_to stmt , :execute
133133 end
134134 assert called
135135 end
136136
137137 def test_execute_no_block_no_bind_no_match
138138 rows = @db . execute ( "select * from foo where a > 100" )
139- assert rows . empty?
139+ assert_empty rows
140140 end
141141
142142 def test_execute_with_block_no_bind_no_match
@@ -149,7 +149,7 @@ def test_execute_with_block_no_bind_no_match
149149
150150 def test_execute_no_block_with_bind_no_match
151151 rows = @db . execute ( "select * from foo where a > ?" , 100 )
152- assert rows . empty?
152+ assert_empty rows
153153 end
154154
155155 def test_execute_with_block_with_bind_no_match
@@ -188,7 +188,7 @@ def test_execute_with_block_with_bind_with_match
188188
189189 def test_execute2_no_block_no_bind_no_match
190190 columns , *rows = @db . execute2 ( "select * from foo where a > 100" )
191- assert rows . empty?
191+ assert_empty rows
192192 assert_equal [ "a" , "b" ] , columns
193193 end
194194
@@ -203,7 +203,7 @@ def test_execute2_with_block_no_bind_no_match
203203
204204 def test_execute2_no_block_with_bind_no_match
205205 columns , *rows = @db . execute2 ( "select * from foo where a > ?" , 100 )
206- assert rows . empty?
206+ assert_empty rows
207207 assert_equal [ "a" , "b" ] , columns
208208 end
209209
@@ -285,7 +285,7 @@ def test_query_with_block_no_bind_no_match
285285 assert_nil result . next
286286 r = result
287287 end
288- assert r . closed?
288+ assert_predicate r , : closed?
289289 end
290290
291291 def test_query_no_block_with_bind_no_match
@@ -300,7 +300,7 @@ def test_query_with_block_with_bind_no_match
300300 assert_nil result . next
301301 r = result
302302 end
303- assert r . closed?
303+ assert_predicate r , : closed?
304304 end
305305
306306 def test_query_no_block_no_bind_with_match
@@ -317,7 +317,7 @@ def test_query_with_block_no_bind_with_match
317317 assert_nil result . next
318318 r = result
319319 end
320- assert r . closed?
320+ assert_predicate r , : closed?
321321 end
322322
323323 def test_query_no_block_with_bind_with_match
@@ -334,7 +334,7 @@ def test_query_with_block_with_bind_with_match
334334 assert_nil result . next
335335 r = result
336336 end
337- assert r . closed?
337+ assert_predicate r , : closed?
338338 end
339339
340340 def test_get_first_row_no_bind_no_match
@@ -464,7 +464,7 @@ def test_transaction_commit_in_block
464464 def test_transaction_active
465465 assert !@db . transaction_active?
466466 @db . transaction
467- assert @db . transaction_active?
467+ assert_predicate @db , : transaction_active?
468468 @db . commit
469469 assert !@db . transaction_active?
470470 end
@@ -473,7 +473,7 @@ def test_transaction_implicit_rollback
473473 assert !@db . transaction_active?
474474 @db . transaction
475475 @db . execute ( "create table bar (x CHECK(1 = 0))" )
476- assert @db . transaction_active?
476+ assert_predicate @db , : transaction_active?
477477 assert_raises ( SQLite3 ::ConstraintException ) do
478478 @db . execute ( "insert or rollback into bar (x) VALUES ('x')" )
479479 end
0 commit comments