# frozen_string_literal: true FactoryBot.define do factory :task, class: Wayfarer::Task do url { test_app_path("/") } batch { "batch" } initialize_with do new(url, batch) end trait :redis_pool do after(:build) do |task| task[:redis_pool] = Wayfarer::Redis::Pool.instance end end end end