diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-05-13 11:26:10 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-05-13 11:32:47 +0900 |
commit | 1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42 (patch) | |
tree | 3bb51baa159489c0ba9632d09f7f926ec3bc4147 /ci/custom_cops | |
parent | 10b6c65dbcb0731c5bee815dc01f84a30983a871 (diff) | |
download | rails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.tar.gz rails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.tar.bz2 rails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.zip |
Fix `CustomCops/AssertNot` to allow it to have failure message
Follow up of #32605.
Diffstat (limited to 'ci/custom_cops')
-rw-r--r-- | ci/custom_cops/lib/custom_cops/assert_not.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ci/custom_cops/lib/custom_cops/assert_not.rb b/ci/custom_cops/lib/custom_cops/assert_not.rb index e722448e21..8b49d3eac2 100644 --- a/ci/custom_cops/lib/custom_cops/assert_not.rb +++ b/ci/custom_cops/lib/custom_cops/assert_not.rb @@ -14,7 +14,7 @@ module CustomCops class AssertNot < RuboCop::Cop::Cop MSG = "Prefer `assert_not` over `assert !`" - def_node_matcher :offensive?, "(send nil? :assert (send ... :!))" + def_node_matcher :offensive?, "(send nil? :assert (send ... :!) ...)" def on_send(node) add_offense(node) if offensive?(node) |