Skip to content

test: test inside a dummy app. #451

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

test: test inside a dummy app. #451

wants to merge 3 commits into from

Conversation

seuros
Copy link
Member

@seuros seuros commented May 31, 2025

No description provided.

@seuros seuros requested a review from Copilot May 31, 2025 15:37
Copy link

@Copilot Copilot AI left a comment

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 adds a dummy Rails application for integration tests, refactors existing test suites for consistency, and streamlines dependency and CI configuration.

  • Introduce a test/dummy Rails app with models, controller, and Rakefile for engine testing
  • Rename and refactor closure_tree tests (e.g. UUIDTagUuidTag, RSpec→Minitest conversions, shared examples signature)
  • Remove legacy Appraisals and gemfiles, update Gemfile and GitHub Actions workflows to use an ENV-driven Rails matrix and bin/rails test

Reviewed Changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/dummy/app/models/application_record.rb Added ApplicationRecord skeleton with primary DB connection
test/dummy/app/models/adamantium.rb Introduced dummy Adamantium model
test/dummy/app/controllers/application_controller.rb Added ApplicationController with CSRF protection
test/dummy/Rakefile Set up dummy app’s Rake tasks
test/closure_tree/uuid_tag_test.rb Renamed UUIDTagUuidTag
test/closure_tree/user_test.rb Cleared User and hierarchy tables in before hook
test/closure_tree/tag_test.rb Converted describe Tag to TagTest class and set TAG_CLASS
test/closure_tree/matcher_test.rb Updated matcher tests to use UuidTag
test/closure_tree/label_test.rb Refactored CorrectOrderValue.shared_examples signature
test/closure_tree/label_order_value_test.rb Added new tests for order_value behavior
gemfiles/activerecord_*.gemfile Removed legacy appraisal-generated gemfiles
Appraisals Removed outdated Appraisals file
closure_tree.gemspec Dropped the appraisal dev dependency
Gemfile Centralized rails/gem dependencies and introduced ENV-driven logic
.github/workflows/ci_truffleruby.yml Removed obsolete CI config
.github/workflows/ci_jruby.yml Removed obsolete CI config
.github/workflows/ci.yml Updated matrix to Ruby 3.4/JRuby/TruffleRuby and revised test steps
Comments suppressed due to low confidence (2)

test/closure_tree/tag_test.rb:8

  • [nitpick] Indent include TagExamples with two spaces (instead of four) to match the two-space class-body indentation and keep style consistent.
    include TagExamples

.github/workflows/ci.yml:83

  • The workflow no longer sets a single DATABASE_URL or DB_ADAPTER for the test suite. Ensure the CI job sets DATABASE_URL (e.g. from one of the DATABASE_URL_* vars) or update the test configuration to read the new per-adapter env vars so tests connect to the intended database.
run: bin/rails test

gem 'with_advisory_lock', github: 'closuretree/with_advisory_lock'
gem 'railties'
Copy link
Preview

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider grouping test-only dependencies like railties and the database adapters under group :development, :test to avoid loading them in production environments.

Suggested change
gem 'railties'

Copilot uses AI. Check for mistakes.

@seuros seuros force-pushed the dummy branch 5 times, most recently from 1f818da to 398d9d8 Compare May 31, 2025 16:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant