Skip to content

Commit

Permalink
Add expectation for namespaced hover (#941)
Browse files Browse the repository at this point in the history
Co-authored-by: Andy Waite <andyw8@users.noreply.github.com>
  • Loading branch information
andyw8 and andyw8 authored Aug 28, 2023
1 parent 7023b68 commit e4f0967
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
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

0 comments on commit e4f0967

Please sign in to comment.