<commit_before>class SimpleJob < Qu::Job
end

class CustomQueue < Qu::Job
  queue :custom
end

shared_examples_for 'a backend' do |options|
  options ||= {}
  services = Array(options[:services]).inject({}) { |hash, service|
    hash[service] = service_running?(service)
    hash
  }

  down_services = services.select { |k, v| !v }.keys

  if down_services.empty?
    let(:worker) { Qu::Worker.new('default') }
    let(:payload) { Qu::Payload.new(:klass => SimpleJob) }

    before(:all) do
      Qu.backend = described_class.new
    end

    before do
      subject.clear(payload.queue)<commit_msg>Minor: formatting.<commit_after>class SimpleJob < Qu::Job
end

class CustomQueue < Qu::Job
  queue :custom
end

shared_examples_for 'a backend' do |options|
  options ||= {}

  services = Array(options[:services]).inject({}) { |hash, service|
    hash[service] = service_running?(service)
    hash
  }

  down_services = services.select { |k, v| !v }.keys

  if down_services.empty?
    let(:worker) { Qu::Worker.new('default') }
    let(:payload) { Qu::Payload.new(:klass => SimpleJob) }

    before(:all) do
      Qu.backend = described_class.new
    end

    before do
      subject.clear(payload.queue)
{'fraction_non_alphanumeric': 0.14593698175787728, 'fraction_numerical': 0.0, 'mean_word_length': 3.6782945736434107, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3181815', 'n_tokens_mistral': 398, 'n_tokens_neox': 388, 'n_words': 88}