From cca57b97ad6d1b1b985376be110b89d2b487dea6 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 30 Nov 2021 12:59:43 -0800 Subject: [PATCH] fix assertion on maria downgrade psych --- Gemfile | 3 +++ spec/mysql2/client_spec.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 3dac0c0b1..d61c57aa4 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,9 @@ gem 'irb', require: false group :test do gem 'eventmachine' unless RUBY_PLATFORM =~ /mswin|mingw/ gem 'rspec', '~> 3.2' + + # Downgrade psych because old RuboCop can't use new Psych + gem 'psych', '~> 3.3.2' # https://github.com/bbatsov/rubocop/pull/4789 gem 'rubocop', '~> 0.50.0' end diff --git a/spec/mysql2/client_spec.rb b/spec/mysql2/client_spec.rb index 1519e0f5d..41fb834bf 100644 --- a/spec/mysql2/client_spec.rb +++ b/spec/mysql2/client_spec.rb @@ -604,7 +604,7 @@ def run_gc end expect do @client.query("SELECT SLEEP(1)") - end.to raise_error(Mysql2::Error, /Lost connection to MySQL server/) + end.to raise_error(Mysql2::Error, /Lost connection/) if RUBY_PLATFORM !~ /mingw|mswin/ expect do