diff options
author | shekharrajak <shekharstudy@ymail.com> | 2017-02-21 15:16:12 +0530 |
---|---|---|
committer | shekharrajak <shekharstudy@ymail.com> | 2017-02-22 12:43:52 +0530 |
commit | b78a3f0bfe73a988704ccb45dc04d3cea19e6db7 (patch) | |
tree | f61e19454634bbde452cacd156009a7706836f48 /spec/commands/inject_spec.rb | |
parent | 67ee37f4bf17c0c27b112ef650b0a514ae04dd2f (diff) | |
download | bundler-b78a3f0bfe73a988704ccb45dc04d3cea19e6db7.tar.gz |
minor changes
Diffstat (limited to 'spec/commands/inject_spec.rb')
-rw-r--r-- | spec/commands/inject_spec.rb | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/spec/commands/inject_spec.rb b/spec/commands/inject_spec.rb index 2a5e8880f0..53cc0a1ae4 100644 --- a/spec/commands/inject_spec.rb +++ b/spec/commands/inject_spec.rb @@ -52,26 +52,21 @@ Usage: "bundle inject GEM VERSION" end end - context "use source and group options" do - it "add gem with source in gemfile" do - bundle "inject 'bootstrap' '>0' --source=https://rubygems.org" + context "with source option" do + it "add gem with source option in gemfile" do + bundle "inject 'bootstrap' '>0' --source=https://ruby.taobao.org/" gemfile = bundled_app("Gemfile").read - str = "gem 'bootstrap', '> 0', :source => 'https://rubygems.org'" - expect(gemfile).to match(/str/) + str = "gem 'bootstrap', '> 0', :source => 'https://ruby.taobao.org/'" + expect(gemfile).to include str end + end - it "add gem with group in gemfile" do + context "with group option" do + it "add gem with group option in gemfile" do bundle "inject 'rack-obama' '>0' --group=development" gemfile = bundled_app("Gemfile").read str = "gem 'rack-obama', '> 0', :group => [:development]" - expect(gemfile).to match(/str/) - end - - it "add gem with source and group in gemfile" do - bundle "inject 'rails' '>0' --source=https://rubygems.org --group=development" - gemfile = bundled_app("Gemfile").read - str = "gem 'rails', '> 0', :group => [:development], :source => 'https://rubygems.org'" - expect(gemfile).to match(/str/) + expect(gemfile).to include str end end |