diff options
author | Dan Finnie <dan@danfinnie.com> | 2014-10-03 22:28:01 -0700 |
---|---|---|
committer | Dan Finnie <dan@danfinnie.com> | 2014-10-03 22:29:42 -0700 |
commit | b41557ad54d4d3a501a811ecb7ed339321848189 (patch) | |
tree | 97494604d28e98b917a615e81b329c7cd7e9635c /spec/install | |
parent | 954ffb3c65d3598b055b27c5f4a5fa680dc482c1 (diff) | |
download | bundler-b41557ad54d4d3a501a811ecb7ed339321848189.tar.gz |
Add warning message when Gemfiles use source with a block.
Diffstat (limited to 'spec/install')
-rw-r--r-- | spec/install/gemfile_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb index 267a7f55..4ebd5f48 100644 --- a/spec/install/gemfile_spec.rb +++ b/spec/install/gemfile_spec.rb @@ -41,4 +41,29 @@ describe "bundle install" do end end + context "with future features" do + context "when source is used with a block" do + it "reports that sources with a block is not supported" do + gemfile <<-G + source 'http://rubygems.example.org' do + gem 'rack' + end + G + + bundle :install + expect(out).to match(/A block was passed to `source`/) + end + end + + context "when source is used without a block" do + it "prints no warnings" do + gemfile <<-G + source 'http://rubygems.example.org' + G + + bundle :install + expect(out).not_to match(/A block was passed to `source`/) + end + end + end end |