Migrate assignment and block tests from Rust to Ruby#72
Merged
Conversation
The Rust test suite in assignments.rs and blocks.rs contained many full-pipeline integration tests (parse → install → propagate → run_all) that duplicated coverage already provided by Ruby integration tests. This migrates UNIQUE test scenarios to Ruby and removes REDUNDANT Rust tests, keeping only true unit tests that verify internal state. Ruby additions: - multi_assign_test.rb: splat mixed types, splat only, array literal RHS, rights exceed RHS, RHS longer than LHS - block_test.rb: block parameter from each_char, block body does not affect method return Rust removals: - assignments.rs: 16 tests removed (1 unit test retained) - blocks.rs: 5 tests removed (3 unit tests retained) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The Rust test suites in
assignments.rs(17 tests) andblocks.rs(8 tests) were dominated by full-pipeline integration tests that duplicated coverage already provided by Ruby integration tests. Per the test strategy rethink ,I migrate UNIQUE scenarios to Ruby and remove REDUNDANT Rust tests, keeping only true unit tests that verify internal state inaccessible via CLI.Changes
Ruby additions
test/multi_assign_test.rb— 5 new tests:test_splat_mixed_types—first, *rest = 1, "hello", :symtest_splat_only—*all = 1, 2, 3test_array_literal_rhs—a, b = [1, "hello"]test_rights_exceed_rhs—a, b, c = 1, 2(c gets nil)test_rhs_longer_than_lhs—a, b = 1, 2, 3(extra values dropped)test/block_test.rb— 2 new tests:test_block_parameter_from_each_char—"hello".each_char { |c| c.upcase }test_block_body_does_not_affect_method_return— block return type does not leak to method returnRust removals
assignments.rs: 16 tests removed → 1 unit test retained (test_multi_write_does_not_panic_on_non_array_rhs)blocks.rs: 5 tests removed → 3 unit tests retained (test_enter_exit_block_scope,test_install_block_parameter,test_block_inherits_parent_scope_vars)Checked
cd core && cargo test --lib— all Rust tests passbundle exec rake test— all Ruby integration tests pass🤖 Generated with Claude Code