diff options
author | Asutosh Palai <asupalai@gmail.com> | 2016-05-27 12:33:32 +0530 |
---|---|---|
committer | Asutosh Palai <asupalai@gmail.com> | 2016-05-27 12:51:55 +0530 |
commit | 10c87cff76e2ec5a21d7b8978debfb19ea9e5ebb (patch) | |
tree | 71a917b667b84f5a099e4e7f9402d8c667705da7 /spec/plugins/install.rb | |
parent | 5ab32cdb78510079d203a2c56ecb2ac56b9de984 (diff) | |
download | bundler-10c87cff76e2ec5a21d7b8978debfb19ea9e5ebb.tar.gz |
Added spec for gemfile eval and a few docs
Diffstat (limited to 'spec/plugins/install.rb')
-rw-r--r-- | spec/plugins/install.rb | 49 |
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 |