Skip to content

Commit

Permalink
fixup: remove nocov comments
Browse files Browse the repository at this point in the history
  • Loading branch information
boardfish committed Jan 4, 2024
1 parent 0a628fd commit 07fa887
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/view_component/test_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,18 +252,15 @@ def __vc_test_helpers_build_controller(klass)

def __vc_test_helpers_preview_class
result = if respond_to?(:described_class)
# :nocov:
raise "`render_preview` expected a described_class, but it is nil." if described_class.nil?

"#{described_class}Preview"
# :nocov:
else
self.class.name.gsub("Test", "Preview")
end
result = result.constantize
rescue NameError
raise NameError, "`render_preview` expected to find #{result}, but it does not exist."
end
# :nocov:
end
end

0 comments on commit 07fa887

Please sign in to comment.