Skip to content

Unit tests #74

Description

@Aleksandergreg

User Story

As a Ruby developer,
I want to implement unit tests using a standard Ruby testing framework,
so that we can catch errors early and validate small components in isolation.


Acceptance Criteria

  • A Ruby testing framework like RSpec or Minitest is installed and configured.
  • At least a few unit tests are written for critical methods or logic.
  • Unit tests are runnable locally by all team members.
  • Unit tests are included in the CI pipeline (kinda already done, but I am a bit in doubt if it is integration or unit).
  • The team has discussed and documented which types of tests were skipped and why.

Tasks

  • Choose a unit testing gem: RSpec (recommended) or Minitest.
  • Add the chosen gem to your Gemfile:
    • For RSpec: gem 'rspec'
    • For Minitest: gem 'minitest'
  • Set up the test environment using rspec --init or appropriate configuration.
  • Write at least 2–3 unit tests for application logic (e.g., services, helpers).
  • Run unit tests locally to ensure correctness.
  • Optionally, integrate unit tests into your CI/CD pipeline.
  • Document your testing decisions (why some components were tested and others not).

Additional Context / Notes (Optional)

  • For RSpec setup: https://rspec.info/documentation/
  • Minitest is built into Ruby, but RSpec has a more expressive DSL and community support.
  • Unit testing isn't required but shows depth in test strategy.

Metadata

Metadata

Assignees

Type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions