spec/thinking_sphinx/errors_spec.rb in thinking-sphinx-5.4.0 vs spec/thinking_sphinx/errors_spec.rb in thinking-sphinx-5.5.0

- old
+ new

@@ -45,9 +45,18 @@ to be_a(ThinkingSphinx::ConnectionError) allow(error).to receive_messages :message => "Lost connection to MySQL server" expect(ThinkingSphinx::SphinxError.new_from_mysql(error)). to be_a(ThinkingSphinx::ConnectionError) + + # MariaDB has removed mention of MySQL in error messages: + allow(error).to receive_messages :message => "Can't connect to server on '127.0.0.1' (61)" + expect(ThinkingSphinx::SphinxError.new_from_mysql(error)). + to be_a(ThinkingSphinx::ConnectionError) + + allow(error).to receive_messages :message => "Lost connection to server" + expect(ThinkingSphinx::SphinxError.new_from_mysql(error)). + to be_a(ThinkingSphinx::ConnectionError) end it 'translates out-of-bounds errors' do allow(error).to receive_messages :message => "offset out of bounds (offset=1001, max_matches=1000)"