Skip to content

Switch test suite from Minitest to RSpec - #35

Merged
p-linnane merged 1 commit into
mainfrom
rspec
Jul 31, 2026
Merged

Switch test suite from Minitest to RSpec#35
p-linnane merged 1 commit into
mainfrom
rspec

Conversation

@andrew

@andrew andrew commented Jul 31, 2026

Copy link
Copy Markdown
Member

Follow-up from #30 (comment) — the rest of the Homebrew org standardised on RSpec, so bring this repo in line.

spec/repology_index_spec.rb is a 1:1 port of test/repology_index_test.rb (30 examples), grouped into describe blocks per method. ScriptedIndex becomes an anonymous Class.new(described_class) in a let so it doesn't leak a top-level constant. Fixtures move to spec/fixtures/ unchanged.

Adds a Gemfile (rake + rspec); Homebrew/actions/setup-ruby already runs bundle install when one is present, so both workflows just gain bundler-cache: true and switch rake testbundle exec rake spec. dependabot.yml is org-synced so no bundler ecosystem entry is added here.

#30 adds test/advisory_index_test.rb; whichever of these merges second will need a small follow-up to convert or add that file under spec/.

Copilot AI review requested due to automatic review settings July 31, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the repository’s Ruby test suite from Minitest to RSpec to align with Homebrew org standards, updates CI to run the new spec task, and introduces Bundler-managed dependencies for consistent local/CI execution.

Changes:

  • Replaced the Minitest test suite with an RSpec spec suite (including fixture relocation).
  • Added Bundler files (Gemfile, Gemfile.lock) and RSpec configuration (.rspec, spec/spec_helper.rb).
  • Updated Rake and GitHub Actions workflows to run bundle exec rake spec (and bundle exec rake repology:build where applicable) with bundler-cache: true.

Reviewed changes

Copilot reviewed 9 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/test_helper.rb Removed Minitest shared helper (no longer needed after migration).
test/repology_index_test.rb Removed Minitest coverage for RepologyIndex (replaced by RSpec).
spec/spec_helper.rb Added shared RSpec helpers and configuration (fixtures, load path, ordering).
spec/repology_index_spec.rb Added RSpec port of the prior Minitest suite for RepologyIndex.
spec/fixtures/repology_page1.json Added fixture data under spec/fixtures/ for RSpec suite.
spec/fixtures/repology_page2.json Added fixture data under spec/fixtures/ for RSpec suite.
Rakefile Switched from rake test task to rake spec via RSpec::Core::RakeTask.
Gemfile Added Bundler dependencies for rake and rspec.
Gemfile.lock Locked dependency versions for consistent installs.
.rspec Configured RSpec to require spec_helper.
.gitignore Ignored Bundler install/cache directories.
.github/workflows/validate.yml Updated CI to use Bundler cache and run bundle exec rake spec.
.github/workflows/regenerate.yml Updated scheduled workflow to use Bundler cache and run spec + repology build via Bundler.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@andrew
andrew requested a review from p-linnane July 31, 2026 12:42

@p-linnane p-linnane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@p-linnane
p-linnane merged commit ce8b873 into main Jul 31, 2026
8 checks passed
@p-linnane
p-linnane deleted the rspec branch July 31, 2026 14:56
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

Successfully merging this pull request may close these issues.

3 participants