aboutsummaryrefslogtreecommitdiffstats
path: root/spec/plugins
diff options
context:
space:
mode:
authorAsutosh Palai <asupalai@gmail.com>2016-05-27 12:33:32 +0530
committerAsutosh Palai <asupalai@gmail.com>2016-05-27 12:51:55 +0530
commit10c87cff76e2ec5a21d7b8978debfb19ea9e5ebb (patch)
tree71a917b667b84f5a099e4e7f9402d8c667705da7 /spec/plugins
parent5ab32cdb78510079d203a2c56ecb2ac56b9de984 (diff)
downloadbundler-10c87cff76e2ec5a21d7b8978debfb19ea9e5ebb.tar.gz
Added spec for gemfile eval and a few docs
Diffstat (limited to 'spec/plugins')
-rw-r--r--spec/plugins/install.rb49
1 files changed, 49 insertions, 0 deletions
diff --git a/spec/plugins/install.rb b/spec/plugins/install.rb
index 33d3b58b..c5d0937d 100644
--- a/spec/plugins/install.rb
+++ b/spec/plugins/install.rb
@@ -71,4 +71,53 @@ describe "bundler plugin install" do
expect(out).to include("Installed plugin foo")
end
end
+
+ context "Gemfile eval" do
+ it "installs plugins listed in gemfile" do
+ gemfile <<-G
+ source 'file://#{gem_repo2}'
+ plugin 'foo'
+ gem 'rack', "1.0.0"
+ G
+
+ bundle "install"
+
+ expect(out).to include("Installed plugin foo")
+
+ expect(out).to include("Bundle complete!")
+
+ should_be_installed("rack 1.0.0")
+ end
+
+ it "accepts plugin version" do
+ update_repo2 do
+ build_plugin "foo", "1.1.0"
+ end
+
+ install_gemfile <<-G
+ source 'file://#{gem_repo2}'
+ plugin 'foo', "1.0"
+ G
+
+ bundle "install"
+
+ expect(out).to include("Installing foo 1.0")
+
+ expect(out).to include("Installed plugin foo")
+
+ expect(out).to include("Bundle complete!")
+ end
+
+ it "accepts git sources" do
+ build_git "ga-plugin" do |s|
+ s.write "plugin.rb"
+ end
+
+ install_gemfile <<-G
+ plugin 'ga-plugin', :git => "#{lib_path("ga-plugin-1.0")}"
+ G
+
+ expect(out).to include("Installed plugin ga-plugin")
+ end
+ end
end