Skip to content

Commit ea655aa

Browse files
authored
Merge pull request #468 from rails-sqlserver/fix-test-warnings
Fix test warnings
2 parents c6e6df7 + 54fddec commit ea655aa

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ Use both dbsetversion() vs. dbsetlversion. Partially reverts #62.
214214
safe to call Result#cancel over and over again.
215215
* Look for the syb headers only.
216216
* Fix minitest global matchers warnings.
217+
* Fix test warnings.
217218

218219

219220
## 0.3.2

test/client_test.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ class ClientTest < TinyTds::TestCase
6565
client.close if client
6666
end
6767
end unless sqlserver_azure?
68-
6968
end
7069

7170
describe 'With in-valid options' do

test/result_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ class ResultTest < TinyTds::TestCase
684684
end
685685

686686
it 'throws an error when you execute another query with other results pending' do
687-
result1 = @client.execute(@query1)
687+
@client.execute(@query1)
688688
action = lambda { @client.execute(@query1) }
689689
assert_raise_tinytds_error(action) do |e|
690690
assert_match %r|with results pending|i, e.message

test/schema_test.rb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SchemaTest < TinyTds::TestCase
1414
describe 'for shared types' do
1515

1616
it 'casts bigint' do
17-
assert_equal -9223372036854775807, find_value(11, :bigint)
17+
assert_equal (-9223372036854775807), find_value(11, :bigint)
1818
assert_equal 9223372036854775806, find_value(12, :bigint)
1919
end
2020

@@ -96,7 +96,7 @@ class SchemaTest < TinyTds::TestCase
9696
end
9797

9898
it 'casts int' do
99-
assert_equal -2147483647, find_value(151, :int)
99+
assert_equal (-2147483647), find_value(151, :int)
100100
assert_equal 2147483646, find_value(152, :int)
101101
end
102102

@@ -170,7 +170,7 @@ class SchemaTest < TinyTds::TestCase
170170
end
171171

172172
it 'casts smallint' do
173-
assert_equal -32767, find_value(241, :smallint)
173+
assert_equal (-32767), find_value(241, :smallint)
174174
assert_equal 32766, find_value(242, :smallint)
175175
end
176176

@@ -396,15 +396,15 @@ class SchemaTest < TinyTds::TestCase
396396
if @client.tds_73?
397397
assertions = lambda {
398398
assert_instance_of Time, v
399-
assert_equal 1984, v.year, 'Year'
400-
assert_equal 1, v.month, 'Month'
401-
assert_equal 24, v.day, 'Day'
402-
assert_equal 4, v.hour, 'Hour'
403-
assert_equal 20, v.min, 'Minute'
404-
assert_equal 59, v.sec, 'Second'
405-
assert_equal 123456, v.usec, 'Microseconds'
406-
assert_equal 123456700, v.nsec, 'Nanoseconds'
407-
assert_equal -28800, v.utc_offset, 'Offset'
399+
assert_equal 1984, v.year, 'Year'
400+
assert_equal 1, v.month, 'Month'
401+
assert_equal 24, v.day, 'Day'
402+
assert_equal 4, v.hour, 'Hour'
403+
assert_equal 20, v.min, 'Minute'
404+
assert_equal 59, v.sec, 'Second'
405+
assert_equal 123456, v.usec, 'Microseconds'
406+
assert_equal 123456700, v.nsec, 'Nanoseconds'
407+
assert_equal (-28800), v.utc_offset, 'Offset'
408408
}
409409
assertions.call
410410
v = find_value 84, :datetimeoffset_7, timezone: :local

test/thread_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ThreadTest < TinyTds::TestCase
4949
begin
5050
result = client.execute "select dbname()"
5151
result.each { |r| puts r }
52-
rescue Exception => e
52+
rescue Exception => _e
5353
# We are throwing an error on purpose here since 0.6.1 would
5454
# segfault on errors thrown in threads
5555
end

0 commit comments

Comments
 (0)