Skip to content

Commit

Permalink
test: Add source_url test when given method is an alias
Browse files Browse the repository at this point in the history
The comment says "source_url is also nil", so add a test to cover that case.
  • Loading branch information
toshimaru committed Nov 17, 2023
1 parent 7869682 commit 0eedb25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/helpers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -867,11 +867,12 @@ def qux; end
end
RUBY

source_code, _source_url = @helpers.method_source_code_and_url(method)
source_code, source_url = @helpers.method_source_code_and_url(method)

_(source_code).must_be_nil
# Unfortunately, _source_url is also nil because RDoc does not provide the
# source code location in this case.
_(source_url).must_be_nil
end

it "returns nil GitHub URL when options.github is false" do
Expand Down

0 comments on commit 0eedb25

Please sign in to comment.