From 67f1cb48e4bab74550cb0abfd43d82cb1411e3fa Mon Sep 17 00:00:00 2001 From: Jared Beck Date: Mon, 15 Feb 2016 20:04:07 -0500 Subject: [PATCH] Fix Lint/Loop --- .rubocop_todo.yml | 5 ----- test/functional/thread_safety_test.rb | 8 +++----- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f96efea7..5a8473f6 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: 1 -Lint/Loop: - Exclude: - - 'test/functional/thread_safety_test.rb' - # Offense count: 3 Lint/UnderscorePrefixedVariableName: Exclude: diff --git a/test/functional/thread_safety_test.rb b/test/functional/thread_safety_test.rb index 908f0f2b..e913b020 100644 --- a/test/functional/thread_safety_test.rb +++ b/test/functional/thread_safety_test.rb @@ -1,15 +1,13 @@ require 'test_helper' class ThreadSafetyTest < ActionController::TestCase - test "be thread safe when using #set_paper_trail_whodunnit" do + test "thread-safe when using #set_paper_trail_whodunnit" do blocked = true slow_thread = Thread.new do controller = TestController.new controller.send :set_paper_trail_whodunnit - begin - sleep 0.001 - end while blocked + sleep 0.001 while blocked PaperTrail.whodunnit end @@ -24,7 +22,7 @@ class ThreadSafetyTest < ActionController::TestCase assert_not_equal slow_thread.value, fast_thread.value end - test "be thread safe when using #without_versioning" do + test "thread-safe when using #without_versioning" do enabled = nil slow_thread = Thread.new do