Skip to content

Migrate implicit self, constant, parameter, and definition tests to Ruby#74

Merged
dak2 merged 1 commit intomainfrom
migrate-implicit-self-constant-param-def-tests-to-ruby
Mar 22, 2026
Merged

Migrate implicit self, constant, parameter, and definition tests to Ruby#74
dak2 merged 1 commit intomainfrom
migrate-implicit-self-constant-param-def-tests-to-ruby

Conversation

@dak2
Copy link
Copy Markdown
Owner

@dak2 dak2 commented Mar 22, 2026

Motivation

The Rust analyzer tests for implicit self calls, constant reads, parameters, and definitions were full-pipeline integration tests (parse → install → propagate → resolve) that duplicated Ruby integration tests. This migration removes redundant Rust tests and moves unique scenarios to Ruby, keeping only true unit tests that verify internal state not observable through the CLI.

Changes

  • definitions.rs: 20 → 12 tests (removed 8 redundant tests covering method registration, class methods, and namespace resolution)
  • dispatch.rs: Removed implicit self call (5), constant read (7), and keyword arg (5) redundant tests; cleaned up unused get_type_show helper
  • parameters.rs: 11 → 3 tests (removed 8 redundant tests, kept only internal env-level unit tests)
  • implicit_self_call_test.rb: Added 2 tests (implicit self in module, implicit self from block)
  • constant_read_test.rb: Added 1 test (deeply nested Api::V1::User resolution)
  • parameter_test.rb: Added 1 test (keyword arg via .newinitialize)

Checked

  • cd core && cargo test --lib — all pass
  • bundle exec rake test — all pass

🤖 Generated with Claude Code

… Rust to Ruby

The Rust analyzer tests for these domains were full-pipeline integration
tests (parse → install → propagate → resolve) that duplicate the Ruby
integration tests. Move unique scenarios to Ruby and remove redundant
Rust tests, keeping only true unit tests that verify internal state
not observable through the CLI.

- definitions.rs: 20 → 12 tests (remove 8 redundant)
- dispatch.rs: remove implicit self, constant read, keyword arg tests
- parameters.rs: 11 → 3 tests (remove 8 redundant)
- Add 2 implicit self call tests to Ruby (module, block)
- Add 1 constant read test to Ruby (deeply nested)
- Add 1 parameter test to Ruby (keyword arg via .new)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dak2 dak2 merged commit 6bacfdd into main Mar 22, 2026
4 checks passed
@dak2 dak2 deleted the migrate-implicit-self-constant-param-def-tests-to-ruby branch March 22, 2026 02:47
@dak2 dak2 mentioned this pull request Mar 24, 2026
2 tasks
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.

1 participant