Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 1a4da92

Browse files
committed
Test default client flag equality instead of bitwise truthiness
1 parent c260b16 commit 1a4da92

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

spec/mysql2/client_spec.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ def connect *args
6666
end
6767
end
6868
client = klient.new
69-
(client.connect_args.last[6] & (Mysql2::Client::REMEMBER_OPTIONS |
70-
Mysql2::Client::LONG_PASSWORD |
71-
Mysql2::Client::LONG_FLAG |
72-
Mysql2::Client::TRANSACTIONS |
73-
Mysql2::Client::PROTOCOL_41 |
74-
Mysql2::Client::SECURE_CONNECTION)).should be_true
69+
client_flags = Mysql2::Client::REMEMBER_OPTIONS |
70+
Mysql2::Client::LONG_PASSWORD |
71+
Mysql2::Client::LONG_FLAG |
72+
Mysql2::Client::TRANSACTIONS |
73+
Mysql2::Client::PROTOCOL_41 |
74+
Mysql2::Client::SECURE_CONNECTION
75+
client.connect_args.last[6].should eql(client_flags)
7576
end
7677

7778
it "should execute init command" do

0 commit comments

Comments
 (0)