diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2016-10-24 23:42:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-24 23:42:21 -0500 |
commit | 5f6f911e1f7e0f525cbfd74b89abdfbc9f6b7268 (patch) | |
tree | 2c5093d715f9ca737726c854383bc58041fbc98d /activerecord/test/cases | |
parent | e9e31af188b8a8f88e06269581757e835b67259c (diff) | |
parent | c5a4d007b8147c2f042844ac267821afa378d8e5 (diff) | |
download | rails-5f6f911e1f7e0f525cbfd74b89abdfbc9f6b7268.tar.gz rails-5f6f911e1f7e0f525cbfd74b89abdfbc9f6b7268.tar.bz2 rails-5f6f911e1f7e0f525cbfd74b89abdfbc9f6b7268.zip |
Merge pull request #26869 from prathamesh-sonpatki/fix-brittle-mysql-tests
Fix brittle tests which were relying on the error message text from mysql2 gem
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/connection_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/connection_test.rb b/activerecord/test/cases/adapters/mysql2/connection_test.rb index b441ce3a34..ff012efc5f 100644 --- a/activerecord/test/cases/adapters/mysql2/connection_test.rb +++ b/activerecord/test/cases/adapters/mysql2/connection_test.rb @@ -65,18 +65,18 @@ class Mysql2ConnectionTest < ActiveRecord::Mysql2TestCase def test_execute_after_disconnect @connection.disconnect! - error = assert_raise(ActiveRecord::StatementInvalid) do + + assert_raise(ActiveRecord::StatementInvalid) do @connection.execute("SELECT 1") end - assert_match(/MySQL client is not connected/, error.message) end def test_quote_after_disconnect @connection.disconnect! - error = assert_raise(Mysql2::Error) do + + assert_raise(Mysql2::Error) do @connection.quote("string") end - assert_match(/MySQL client is not connected/, error.message) end def test_active_after_disconnect |