Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: Fix cattr_accessor in spec/sample_jobs #1166

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions spec/sample_jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def display_name

class SimpleJob
cattr_accessor :runs
@runs = 0
@@runs = 0
def perform
self.class.runs += 1
end
Expand All @@ -21,7 +21,7 @@ def queue_name

class ErrorJob
cattr_accessor :runs
@runs = 0
@@runs = 0
def perform
raise Exception, 'did not work'
end
Expand All @@ -30,7 +30,7 @@ def perform
CustomRescheduleJob = Struct.new(:offset)
class CustomRescheduleJob
cattr_accessor :runs
@runs = 0
@@runs = 0
def perform
raise 'did not work'
end
Expand Down Expand Up @@ -65,7 +65,7 @@ def max_attempts
module M
class ModuleJob
cattr_accessor :runs
@runs = 0
@@runs = 0
def perform
self.class.runs += 1
end
Expand Down