Skip to content

Commit

Permalink
Merge pull request #4084 from ayanko/bugfix-plugin-source-api-to-s
Browse files Browse the repository at this point in the history
Fix `Bundler::Plugin::API::Source#to_s` having empty source type
  • Loading branch information
deivid-rodriguez committed Dec 1, 2020
2 parents 6bc9889 + d91ef87 commit f38872c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bundler/lib/bundler/plugin/api/source.rb
Expand Up @@ -260,7 +260,7 @@ def to_lock
end

def to_s
"plugin source for #{options[:type]} with uri #{uri}"
"plugin source for #{@type} with uri #{@uri}"
end

# Note: Do not override if you don't know what you are doing.
Expand Down
6 changes: 6 additions & 0 deletions bundler/spec/bundler/plugin/api/source_spec.rb
Expand Up @@ -79,4 +79,10 @@
end
end
end

describe "to_s" do
it "returns the string with type and uri" do
expect(source.to_s).to eq("plugin source for spec_type with uri uri://to/test")
end
end
end

0 comments on commit f38872c

Please sign in to comment.