From e31717f490c5b75f65121b14c34a327737ba9ac5 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Mon, 28 May 2018 20:59:32 +0200 Subject: Fix cattr_accessor definition Use cattr_accessor directly inside the defined class, otherwise in Rails 5 this accessor returns nil. --- spec/workers/concerns/waitable_worker_spec.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'spec') diff --git a/spec/workers/concerns/waitable_worker_spec.rb b/spec/workers/concerns/waitable_worker_spec.rb index 54ab07981a4..199825b5097 100644 --- a/spec/workers/concerns/waitable_worker_spec.rb +++ b/spec/workers/concerns/waitable_worker_spec.rb @@ -7,9 +7,7 @@ describe WaitableWorker do 'Gitlab::Foo::Bar::DummyWorker' end - class << self - cattr_accessor(:counter) { 0 } - end + cattr_accessor(:counter) { 0 } include ApplicationWorker prepend WaitableWorker -- cgit v1.2.1