Skip to content

Add a test suite (RSpec or Minitest) with CI on Linux + Redis #12

@jerry7991

Description

@jerry7991

Problem

The repository has no test framework wired up and no CI. This is the root cause that lets bugs like the capital-D require (Linux load failure) and the pool-size-after-build ordering slip through.

Fix

  1. Pick a framework (RSpec is idiomatic for gems; Minitest is lighter).
  2. Add a spec/ or test/ directory with coverage for:
    • Configuration defaults + ENV overrides.
    • YamlLoader applies values, tolerates missing file.
    • HandlerRegistry register / lookup / clear / uniqueness error.
    • Dispatcher.enqueue builds correct payload, rejects non-workers, pushes to the right key.
    • Worker DSL: queue_as, job_name, fallback to default queue.
    • End-to-end: enqueue → worker loop pops → handler runs (integration test against real Redis).
  3. Add GitHub Actions CI on ubuntu-latest with a Redis service container. Run the full suite plus a smoke test that requires the gem (catches case-sensitive filename bugs).
  4. Add RuboCop with the project's existing style directives.

Acceptance

  • bundle exec rspec passes locally and in CI.
  • CI runs on every PR against master.
  • Linux load regression would fail CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions