Skip to content

Commit 8d194ac

Browse files
committed
Test default client flag equality instead of bitwise truthiness
1 parent f07b36d commit 8d194ac

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
@@ -64,12 +64,13 @@ def connect *args
6464
end
6565
end
6666
client = klient.new
67-
expect(client.connect_args.last[6] & (Mysql2::Client::REMEMBER_OPTIONS |
68-
Mysql2::Client::LONG_PASSWORD |
69-
Mysql2::Client::LONG_FLAG |
70-
Mysql2::Client::TRANSACTIONS |
71-
Mysql2::Client::PROTOCOL_41 |
72-
Mysql2::Client::SECURE_CONNECTION)).to be > 0
67+
client_flags = Mysql2::Client::REMEMBER_OPTIONS |
68+
Mysql2::Client::LONG_PASSWORD |
69+
Mysql2::Client::LONG_FLAG |
70+
Mysql2::Client::TRANSACTIONS |
71+
Mysql2::Client::PROTOCOL_41 |
72+
Mysql2::Client::SECURE_CONNECTION
73+
expect(client.connect_args.last[6]).to eql(client_flags)
7374
end
7475

7576
it "should execute init command" do

0 commit comments

Comments
 (0)