diff options
author | Andre Arko <andre@arko.net> | 2014-08-15 23:20:32 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2014-08-16 11:26:47 -0700 |
commit | f47aedb94ecaf17a360d2a92a38f99216c94f8cd (patch) | |
tree | 8a0f06bcde1e90a059057bfe2cacdc2568b0269e /spec/bundler/source_list_spec.rb | |
parent | 74e0daf365b867852a683c29b51bd45c6c646e1c (diff) | |
download | bundler-f47aedb94ecaf17a360d2a92a38f99216c94f8cd.tar.gz |
update specs for RSpec 3 changes
Diffstat (limited to 'spec/bundler/source_list_spec.rb')
-rw-r--r-- | spec/bundler/source_list_spec.rb | 41 |
1 files changed, 10 insertions, 31 deletions
diff --git a/spec/bundler/source_list_spec.rb b/spec/bundler/source_list_spec.rb index 3e16384e09..e74337f64e 100644 --- a/spec/bundler/source_list_spec.rb +++ b/spec/bundler/source_list_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe Bundler::SourceList do before do - Bundler.stub(:root) { Pathname.new '/' } + allow(Bundler).to receive(:root) { Pathname.new '/' } end subject(:source_list) { Bundler::SourceList.new } @@ -337,23 +337,12 @@ describe Bundler::SourceList do let(:git_source) { source_list.add_git_source('uri' => 'git://host/path.git') } let(:path_source) { source_list.add_path_source('path' => '/path/to/gem') } - before do - rubygems_source.stub(:cached!) - git_source.stub(:cached!) - path_source.stub(:cached!) + it "calls #cached! on all the sources" do + expect(rubygems_source).to receive(:cached!) + expect(git_source).to receive(:cached!) + expect(path_source).to receive(:cached!) source_list.cached! end - - it "calls #cached! on the included rubygems source" do - expect(rubygems_source).to have_received(:cached!) - end - - it "calls #cached! on the included git source" do - expect(git_source).to have_received(:cached!) - end - it "calls #cached! on the included path source" do - expect(path_source).to have_received(:cached!) - end end describe "#remote!" do @@ -361,22 +350,12 @@ describe Bundler::SourceList do let(:git_source) { source_list.add_git_source('uri' => 'git://host/path.git') } let(:path_source) { source_list.add_path_source('path' => '/path/to/gem') } - before do - rubygems_source.stub(:remote!) - git_source.stub(:remote!) - path_source.stub(:remote!) + it "calls #remote! on all the sources" do + expect(rubygems_source).to receive(:remote!) + expect(git_source).to receive(:remote!) + expect(path_source).to receive(:remote!) source_list.remote! end - - it "calls #remote! on the included rubygems source" do - expect(rubygems_source).to have_received(:remote!) - end - - it "calls #remote! on the included git source" do - expect(git_source).to have_received(:remote!) - end - it "calls #remote! on the included path source" do - expect(path_source).to have_received(:remote!) - end end + end |