File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2
2
require 'test_helper'
3
3
4
4
class ClientTest < TinyTds ::TestCase
5
+ before do
6
+ @@current_schema_loaded ||= load_current_schema
7
+ end
8
+
5
9
describe 'with valid credentials' do
6
10
before do
7
11
@client = new_connection
@@ -327,7 +331,7 @@ class ClientTest < TinyTds::TestCase
327
331
it 'has a #do method that cancels result rows and returns affected rows natively' do
328
332
rollback_transaction ( @client ) do
329
333
text = 'test affected rows native'
330
- count = @client . execute ( "SELECT COUNT(*) AS [count] FROM [datatypes]" ) . each . first [ 'count' ]
334
+ count = @client . execute ( "SELECT COUNT(*) AS [count] FROM [datatypes]" ) . first [ 'count' ]
331
335
deleted_rows = @client . do ( "DELETE FROM [datatypes]" )
332
336
assert_equal count , deleted_rows , 'should have deleted rows equal to count'
333
337
inserted_rows = @client . do ( "INSERT INTO [datatypes] ([varchar_50]) VALUES ('#{ text } ')" )
You can’t perform that action at this time.
0 commit comments