-
Notifications
You must be signed in to change notification settings - Fork 243
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
UUIDTag
→UuidTag
, RSpec→Minitest conversions, shared examples signature) - Remove legacy Appraisals and gemfiles, update
Gemfile
and GitHub Actions workflows to use an ENV-driven Rails matrix andbin/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 UUIDTag → UuidTag |
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
orDB_ADAPTER
for the test suite. Ensure the CI job setsDATABASE_URL
(e.g. from one of theDATABASE_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' |
There was a problem hiding this comment.
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.
gem 'railties' |
Copilot uses AI. Check for mistakes.
1f818da
to
398d9d8
Compare
No description provided.