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

Cop idea: Prevent Sidekiq from being disabled in specs globally #19

Open
ydakuka opened this issue Dec 8, 2023 · 0 comments
Open

Cop idea: Prevent Sidekiq from being disabled in specs globally #19

ydakuka opened this issue Dec 8, 2023 · 0 comments

Comments

@ydakuka
Copy link

ydakuka commented Dec 8, 2023

# frozen_string_literal: true

require 'rails_helper'

# bad
RSpec.describe ApplicationHelper do
  before do
    Sidekiq::Testing.disable!
  end

  # TODO: some code
end

# good
RSpec.describe ApplicationHelper do
  around do |example|
    Sidekiq::Testing.disable! do
      example.run
    end
  end

  # TODO: some code
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant