원클릭으로
test
Write, debug, and understand Ruby Fast LSP integration tests, test harness tags, fixtures, and test commands.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Write, debug, and understand Ruby Fast LSP integration tests, test harness tags, fixtures, and test commands.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Design Ruby Fast LSP features, understand module responsibilities, apply layer boundaries, and make structural changes.
Create, update, validate, and maintain Ruby Fast LSP C4 architecture diagrams using LikeC4.
Implement or review error handling patterns in Ruby Fast LSP, including Result, Option, logging, failures, and exception flows.
Optimize Ruby Fast LSP performance, profile latency and memory, benchmark changes, and make performance-critical decisions.
Refactor Ruby Fast LSP modules, extract abstractions, reduce complexity, and preserve test coverage during structural changes.
Release a new version of ruby-fast-lsp. Bumps version in Cargo.toml, commits, tags, and pushes to trigger CI. Use when the user says /release, 'release', 'publish', 'bump version', 'cut a release', or 'new version'.
| name | test |
| description | Write, debug, and understand Ruby Fast LSP integration tests, test harness tags, fixtures, and test commands. |
Use this skill when writing, debugging, or understanding integration tests for the Ruby Fast LSP project. Triggers: writing tests, adding tests, integration tests, test harness, test fixtures, test markers.
cargo test # Run all tests
cargo test -- --nocapture # Run with output visible
cargo test test_name # Run specific test
cargo test methods:: # Run tests in a module
The project uses a marker-based inline fixture testing system located in src/test/integration/. Tests use embedded Ruby code with XML-like markers to define assertions.
src/test/integration/
├── mod.rs # Module loader
├── classes/ # Class tests (goto, references, hover, type_hierarchy)
├── constants/ # Constant tests (goto, references)
├── methods/ # Method tests (largest, most complex)
│ └── inference/ # Return type inference tests
├── modules/ # Module tests (mixins, hover, code_lens)
└── variables/ # Variable tests by scope
└── local/ # Local variable inference/hints
Core utilities in src/test/harness/:
fixture.rs - Marker extraction, server setupcheck.rs - Unified check function with auto-detectioninlay_hints.rs - Inlay hint label extractionuse crate::test::harness::check;
#[tokio::test]
async fn test_goto_class() {
check(r#"
<def>class Foo
end</def>
Foo$0.new
"#).await;
}
use crate::test::harness::check_multi_file;
#[tokio::test]
async fn test_cross_file_inference() {
check_multi_file(&[
("main.rb", r#"
class Main
def greet<type label="String">
Helper.get_name
end
end
"#),
("helper.rb", r#"
class Helper
# @return [String]
def self.get_name
"hello"
end
end
"#),
]).await;
}
| Marker | Example | Purpose |
|---|---|---|
$0 | Foo$0.bar | Cursor position for goto/references/hover |
<def>...</def> | <def>class Foo</def> | Expected goto definition target |
<ref>...</ref> | <ref>foo</ref> | Expected reference location |
| Marker | Example | Purpose |
|---|---|---|
<type label="T"> | <type label="String"> | Verify inferred type at position |
<hint label="T"> | x<hint label="String"> = "hi" | Expected inlay hint |
<hover label="T"> | name<hover label="String"> | Verify hover contains label |
| Marker | Example | Purpose |
|---|---|---|
<err>...</err> | <err>bad code</err> | Expected error diagnostic |
<warn>...</warn> | <warn message="...">code</warn> | Expected warning |
<err none>...</err> | <err none>valid</err> | Negative assertion (no errors) |
| Marker | Example | Purpose |
|---|---|---|
<lens title="T"> | <lens title="include"> | Expected code lens |
<th supertypes="A" subtypes="B"> | With $0 cursor | Type hierarchy check |
#[tokio::test]
async fn goto_nested_class() {
check(r#"
module A
<def>class B
end</def>
end
A::B$0.new
"#).await;
}
#[tokio::test]
async fn references_method() {
check(r#"
class Foo
<ref>def bar</ref>
end
def call_it
<ref>bar</ref>
end
end
Foo.new.<ref>bar$0</ref>
"#).await;
}
#[tokio::test]
async fn inlay_hint_local_variable() {
check(r#"
class Foo
def test
x<hint label="String"> = "hello"
y<hint label="Integer"> = 42
end
end
"#).await;
}
#[tokio::test]
async fn method_return_type() {
check(r#"
class Foo
# @return [String]
def greet<type label="String">
"hello"
end
end
"#).await;
}
#[tokio::test]
async fn hover_shows_type() {
check(r#"
class Foo
# @param name [String] the name
def greet(name<hover label="String">)
name
end
end
"#).await;
}
#[tokio::test]
async fn type_mismatch_warning() {
check(r#"
class Foo
# @return [String]
def greet
<warn message="Expected String">42</warn>
end
end
"#).await;
}
#[tokio::test]
async fn valid_code_no_errors() {
check(r#"
<err none>
class Foo
# @return [String]
def greet
"hello"
end
end
</err>
"#).await;
}
#[tokio::test]
async fn mixin_code_lens() {
check(r#"
module M <lens title="include">
end
class Foo
include M
end
"#).await;
}
#[tokio::test]
async fn class_hierarchy() {
check(r#"
class Parent; end
class Child$0 < Parent <th supertypes="Parent" subtypes="">
end
"#).await;
}
You can combine multiple markers in one test:
#[tokio::test]
async fn combined_assertions() {
check(r#"
<def>class Foo
# @param name [String]
def greet(name<hover label="String">)
msg<hint label="String"> = name
msg
end
end</def>
Foo$0.new.greet("test")
"#).await;
}
The check() function auto-detects which assertions to run based on markers present:
$0) if present$0 + <def> → runs goto check$0 + <ref> → runs references check<type> → runs type inference check<hint> → runs inlay hints check<err>/<warn> → runs diagnostics check<lens> → runs code lens check<hover> → runs hover check<th> + $0 → runs type hierarchy checksrc/test/integration/cargo test test_name to verify$0 required for navigation tests - goto, references, hover need itcheck_multi_file for cross-file scenarios, not multiple check calls# Run single test with output
cargo test test_name -- --nocapture
# Run tests matching pattern
cargo test goto -- --nocapture
# Show all test names
cargo test -- --list