@@ -67,8 +67,6 @@ def test_remove_index_when_name_and_wrong_column_name_specified_positional_argum
6767 class AdapterTestWithoutTransaction < ActiveRecord ::TestCase
6868 self . use_transactional_tests = false
6969
70- fixtures :posts , :authors , :author_addresses
71-
7270 class Widget < ActiveRecord ::Base
7371 self . primary_key = "widgetid"
7472 end
@@ -79,7 +77,6 @@ def setup
7977
8078 teardown do
8179 @connection . drop_table :widgets , if_exists : true
82- @connection . exec_query ( "DROP SEQUENCE IF EXISTS widget_seq" )
8380 @connection . exec_query ( "DROP SEQUENCE IF EXISTS widgets_seq" )
8481 end
8582
@@ -97,46 +94,5 @@ def test_reset_empty_table_with_custom_pk_sequence
9794 " )
9895 assert_equal 1 , Widget . create ( name : "weather" ) . id
9996 end
100-
101- def test_truncate_tables
102- assert_operator Post . count , :> , 0
103- assert_operator Author . count , :> , 0
104- assert_operator AuthorAddress . count , :> , 0
105-
106- @connection . truncate_tables ( "author_addresses" , "authors" , "posts" )
107-
108- assert_equal 0 , Post . count
109- assert_equal 0 , Author . count
110- assert_equal 0 , AuthorAddress . count
111- ensure
112- reset_fixtures ( "author_addresses" , "authors" , "posts" )
113- end
114-
115- def test_truncate_tables_with_query_cache
116- @connection . enable_query_cache!
117-
118- assert_operator Post . count , :> , 0
119- assert_operator Author . count , :> , 0
120- assert_operator AuthorAddress . count , :> , 0
121-
122- @connection . truncate_tables ( "author_addresses" , "authors" , "posts" )
123-
124- assert_equal 0 , Post . count
125- assert_equal 0 , Author . count
126- assert_equal 0 , AuthorAddress . count
127- ensure
128- reset_fixtures ( "author_addresses" , "authors" , "posts" )
129- @connection . disable_query_cache!
130- end
131-
132- private
133-
134- def reset_fixtures ( *fixture_names )
135- ActiveRecord ::FixtureSet . reset_cache
136-
137- fixture_names . each do |fixture_name |
138- ActiveRecord ::FixtureSet . create_fixtures ( FIXTURES_ROOT , fixture_name )
139- end
140- end
14197 end
14298end
0 commit comments