summaryrefslogtreecommitdiff
path: root/spec/plugins/install_spec.rb
diff options
context:
space:
mode:
authorAsutosh Palai <asupalai@gmail.com>2016-06-28 18:54:31 +0530
committerAsutosh Palai <asupalai@gmail.com>2016-07-03 09:41:58 +0530
commit6a18a3b17d8e7a05b1945609ef30ea9445e1d8f5 (patch)
tree0ec2ebdf3695dcae6689db6273c036e2846372a8 /spec/plugins/install_spec.rb
parent0cdbdbeef8d28223c483791f5e57cb25103cd7ae (diff)
downloadbundler-6a18a3b17d8e7a05b1945609ef30ea9445e1d8f5.tar.gz
Spec fixes and spec for adding load path and rubocop fixes
Diffstat (limited to 'spec/plugins/install_spec.rb')
-rw-r--r--spec/plugins/install_spec.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/plugins/install_spec.rb b/spec/plugins/install_spec.rb
index e0db0afa31..070a234a4a 100644
--- a/spec/plugins/install_spec.rb
+++ b/spec/plugins/install_spec.rb
@@ -45,6 +45,29 @@ describe "bundler plugin install" do
plugin_should_be_installed("foo", "kung-foo")
end
+ it "works with different load paths" do
+ build_repo2 do
+ build_plugin "testing" do |s|
+ s.write "plugins.rb", <<-RUBY
+ require "fubar"
+ class Test < Bundler::Plugin::API
+ command "check2"
+
+ def exec(command, args)
+ puts "mate"
+ end
+ end
+ RUBY
+ s.require_paths = %w(lib src)
+ s.write("src/fubar.rb")
+ end
+ end
+ bundle "plugin install testing --source file://#{gem_repo2}"
+
+ bundle "check2", "no-color" => false
+ expect(out).to eq("mate")
+ end
+
context "malformatted plugin" do
it "fails when plugins.rb is missing" do
build_repo2 do