Skip to content
Open
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
23 changes: 23 additions & 0 deletions test/spoom/deadcode/remover_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,29 @@ def baz; end
RB
end

def test_removes_node_rbs_comment
res = remove(<<~RB, "bar")
class Foo
def foo; end

#: -> void
def bar
something
end

def baz; end
end
RB

assert_equal(<<~RB, res)
class Foo
def foo; end

def baz; end
end
RB
end

def test_removes_singleton_class_if_needed
res = remove(<<~RB, "foo")
class Foo
Expand Down