summaryrefslogtreecommitdiff
path: root/spec/install/gemfile_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/install/gemfile_spec.rb')
-rw-r--r--spec/install/gemfile_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/install/gemfile_spec.rb b/spec/install/gemfile_spec.rb
index 267a7f55db..4ebd5f4895 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