Simplify #inspect and #to_s output for App

Makes for a nicer `rake routes` command output in Rails apps.
parent 5949bb14
......@@ -20,6 +20,11 @@ module Uppy
@router.call(env)
end
def inspect
"#<Uppy::S3Multipart::App>"
end
alias to_s inspect
class Router < Roda
plugin :all_verbs
plugin :json
......
......@@ -373,4 +373,9 @@ describe Uppy::S3Multipart::App do
assert_equal "bob", @s3.api_requests[0][:params][:request_payer]
end
end
it "defines #inspect and #to_s" do
assert_equal "#<Uppy::S3Multipart::App>", @endpoint.inspect
assert_equal "#<Uppy::S3Multipart::App>", @endpoint.to_s
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment