Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add expectation for namespaced hover #941

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions test/expectations/hover/documented_namespaced_class.exp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"params": [
{
"line": 1,
"character": 6
}
],
"result": {
"contents": {
"kind": "markdown",
"value": "```ruby\nFoo::Bar\n```\n\n**Definitions**: [fake.rb](file:///fake.rb#L2,1-3,3) | [fake.rb](file:///fake.rb#L6,1-7,3) | [fake.rb](file:///fake.rb#L11,3-12,5)\n\n\n\nThis is the documentation for Foo::Bar\n\nThis is more documentation for Foo::Bar\n\nThis is even more documentation for Foo::Bar"
},
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 14
}
}
}
}
13 changes: 13 additions & 0 deletions test/fixtures/documented_namespaced_class.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is the documentation for Foo::Bar
class Foo::Bar
end

# This is more documentation for Foo::Bar
class Foo::Bar
end

class Foo
# This is even more documentation for Foo::Bar
class Bar
end
end