From 08efe9f7a8b93f300addc92a5d739da3f7a55a00 Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Mon, 15 Feb 2016 19:28:54 -0500 Subject: [PATCH] Fix Lint/AmbiguousRegexpLiteral --- .rubocop_todo.yml | 5 ----- test/unit/model_test.rb | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 69a09f02..e4d60cf0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,11 +1,6 @@ # Remove these configuration records # one by one as the offenses are removed from the code base. -# Offense count: 3 -Lint/AmbiguousRegexpLiteral: - Exclude: - - 'test/unit/model_test.rb' - # Offense count: 2 # Cop supports --auto-correct. Lint/DeprecatedClassMethods: diff --git a/test/unit/model_test.rb b/test/unit/model_test.rb index d3d515d0..a96058d3 100644 --- a/test/unit/model_test.rb +++ b/test/unit/model_test.rb @@ -255,7 +255,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase end should 'record the correct event' do - assert_match /create/i, @widget.versions.first.event + assert_match(/create/i, @widget.versions.first.event) end should 'be live' do @@ -311,7 +311,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase end should 'record the correct event' do - assert_match /update/i, @widget.versions.last.event + assert_match(/update/i, @widget.versions.last.event) end should 'have versions that are not live' do @@ -428,7 +428,7 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase end should 'record the correct event' do - assert_match /destroy/i, PaperTrail::Version.last.event + assert_match(/destroy/i, PaperTrail::Version.last.event) end should 'have three previous versions' do