We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 818d74b + 6bf04fa commit 685f904Copy full SHA for 685f904
spec/mysql2/statement_spec.rb
@@ -8,7 +8,9 @@
8
9
it "should create a statement" do
10
statement = nil
11
- expect { statement = @client.prepare 'SELECT 1' }.not_to raise_error
+ expect { statement = @client.prepare 'SELECT 1' }.to change {
12
+ @client.query("SHOW STATUS LIKE 'Prepared_stmt_count'").first['Value'].to_i
13
+ }.by(1)
14
expect(statement).to be_an_instance_of(Mysql2::Statement)
15
end
16
@@ -668,7 +670,9 @@
668
670
context 'close' do
669
671
it 'should free server resources' do
672
stmt = @client.prepare 'SELECT 1'
- expect(stmt.close).to eq nil
673
+ expect { stmt.close }.to change {
674
675
+ }.by(-1)
676
677
678
it 'should raise an error on subsequent execution' do
0 commit comments