diff options
author | Andre Arko <andre@arko.net> | 2015-05-05 13:46:58 -0700 |
---|---|---|
committer | Samuel E. Giddins <segiddins@segiddins.me> | 2015-07-16 08:24:52 -0700 |
commit | 69bc4eef93142b68703de4fca07d864a74e1a959 (patch) | |
tree | bb272cd938e3f3823c389f14ef178bbd544f48df | |
parent | 36a7560084eb81be6ad1eafc228c2e75e60b5e39 (diff) | |
download | bundler-69bc4eef93142b68703de4fca07d864a74e1a959.tar.gz |
move deprecation specs to deprecation_spec.rb
-rw-r--r-- | spec/bundler/bundler_spec.rb | 60 | ||||
-rw-r--r-- | spec/deprecation_spec.rb | 58 |
2 files changed, 58 insertions, 60 deletions
diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb index cd924df07c..1cdfc6d30f 100644 --- a/spec/bundler/bundler_spec.rb +++ b/spec/bundler/bundler_spec.rb @@ -3,66 +3,6 @@ require "spec_helper" require "bundler" describe Bundler do - describe "version 1.99" do - context "when bundle is run" do - it "should print a single deprecation warning" do - # install_gemfile calls `bundle :install, opts` - install_gemfile <<-G - source "file://#{gem_repo1}" - gem "rack" - G - - expect(out).to include("DEPRECATION: Gemfile and Gemfile.lock are " \ - "deprecated and will be replaced with gems.rb and gems.locked in " \ - "Bundler 2.0.0.") - expect(err).to lack_errors - end - end - - context "when Bundler.setup is run in a ruby script" do - it "should print a single deprecation warning" do - install_gemfile <<-G - source "file://#{gem_repo1}" - gem "rack", :group => :test - G - - ruby <<-RUBY - require 'rubygems' - require 'bundler' - require 'bundler/vendored_thor' - - Bundler.ui = Bundler::UI::Shell.new - Bundler.setup - Bundler.setup - RUBY - - expect(out).to eq("DEPRECATION: Gemfile and Gemfile.lock are " \ - "deprecated and will be replaced with gems.rb and gems.locked in " \ - "Bundler 2.0.0.") - expect(err).to lack_errors - end - end - - context "when `bundler/deployment` is required in a ruby script" do - it "should print a capistrano deprecation warning" do - install_gemfile <<-G - source "file://#{gem_repo1}" - gem "rack", :group => :test - G - - ruby(<<-RUBY, { :expect_err => true }) - require 'bundler/deployment' - RUBY - - expect(err).to include("DEPRECATION: Bundler no longer integrates " \ - "with Capistrano, but Capistrano provides " \ - "its own integration with Bundler via the " \ - "capistrano-bundler gem. Use it instead.") - expect(err).to lack_errors - end - end - end - describe "#load_gemspec_uncached" do let(:app_gemspec_path) { tmp("test.gemspec") } subject { Bundler.load_gemspec_uncached(app_gemspec_path) } diff --git a/spec/deprecation_spec.rb b/spec/deprecation_spec.rb new file mode 100644 index 0000000000..9fbed885b6 --- /dev/null +++ b/spec/deprecation_spec.rb @@ -0,0 +1,58 @@ +require "spec_helper" + +describe "Bundler version 1.99" do + context "when bundle is run" do + it "should print a single deprecation warning" do + # install_gemfile calls `bundle :install, opts` + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack" + G + + expect(err).to eq("DEPRECATION: Gemfile and Gemfile.lock are " \ + "deprecated and will be replaced with gems.rb and gems.locked in " \ + "Bundler 2.0.0.") + end + end + + context "when Bundler.setup is run in a ruby script" do + it "should print a single deprecation warning" do + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack", :group => :test + G + + ruby <<-RUBY + require 'rubygems' + require 'bundler' + require 'bundler/vendored_thor' + + Bundler.ui = Bundler::UI::Shell.new + Bundler.setup + Bundler.setup + RUBY + + expect(err).to eq("DEPRECATION: Gemfile and Gemfile.lock are " \ + "deprecated and will be replaced with gems.rb and gems.locked in " \ + "Bundler 2.0.0.") + end + end + + context "when `bundler/deployment` is required in a ruby script" do + it "should print a capistrano deprecation warning" do + install_gemfile <<-G + source "file://#{gem_repo1}" + gem "rack", :group => :test + G + + ruby(<<-RUBY, { :expect_err => true }) + require 'bundler/deployment' + RUBY + + expect(err).to eq("DEPRECATION: Bundler no longer integrates " \ + "with Capistrano, but Capistrano provides " \ + "its own integration with Bundler via the " \ + "capistrano-bundler gem. Use it instead.") + end + end +end |