diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-08-13 09:20:39 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-08-13 09:20:39 +0200 |
commit | 48a183ecb9992723a0b7dc8eee1c4bd41cf8d921 (patch) | |
tree | 9cf5019046a88622899a4f0cae396f0476f4f98b /activerecord/test/cases/adapters | |
parent | 3b0e1e49e092d49db5f8ca590ae1e4342d16ba5f (diff) | |
download | rails-48a183ecb9992723a0b7dc8eee1c4bd41cf8d921.tar.gz rails-48a183ecb9992723a0b7dc8eee1c4bd41cf8d921.tar.bz2 rails-48a183ecb9992723a0b7dc8eee1c4bd41cf8d921.zip |
use `assert_not` instead of `refute` as mentioned in our guides.
As described in the "Follow Coding Conventions" section in our
contribution guide (http://edgeguides.rubyonrails.org/contributing_to_ruby_on_rails.html#follow-the-coding-conventions)
we favor `assert_not` over `refute`.
While we don't usually make stylistic changes on it's own I opted to do
it in this case. The reason being that test cases are usually copied as
a starting point for new tests. This results in a spread of `refute` in
files that have been using it already.
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/mysql/quoting_test.rb | 2 | ||||
-rw-r--r-- | activerecord/test/cases/adapters/mysql2/quoting_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/adapters/mysql/quoting_test.rb b/activerecord/test/cases/adapters/mysql/quoting_test.rb index 426b088e2f..2024aa36ab 100644 --- a/activerecord/test/cases/adapters/mysql/quoting_test.rb +++ b/activerecord/test/cases/adapters/mysql/quoting_test.rb @@ -24,6 +24,6 @@ class MysqlQuotingTest < ActiveRecord::MysqlTestCase @conn.stubs(:full_version).returns('5.6.3') @conn.remove_instance_variable(:@version) if @conn.instance_variable_defined?(:@version) t = Time.now.change(usec: 1) - refute_match(/\.000001\z/, @conn.quoted_date(t)) + assert_no_match(/\.000001\z/, @conn.quoted_date(t)) end end diff --git a/activerecord/test/cases/adapters/mysql2/quoting_test.rb b/activerecord/test/cases/adapters/mysql2/quoting_test.rb index 92221e61bf..2de7e1b526 100644 --- a/activerecord/test/cases/adapters/mysql2/quoting_test.rb +++ b/activerecord/test/cases/adapters/mysql2/quoting_test.rb @@ -16,6 +16,6 @@ class Mysql2QuotingTest < ActiveRecord::Mysql2TestCase @connection.stubs(:full_version).returns('5.6.3') @connection.remove_instance_variable(:@version) if @connection.instance_variable_defined?(:@version) t = Time.now.change(usec: 1) - refute_match(/\.000001\z/, @connection.quoted_date(t)) + assert_no_match(/\.000001\z/, @connection.quoted_date(t)) end end |