Permalink
Browse files

Move a bundle update spec for git into update/source_spec.rb

  • Loading branch information...
Carl Lerche
Carl Lerche committed May 8, 2010
1 parent d481a28 commit cd8a5638e04c73216229d07e6ae0af13202cd08f
Showing with 33 additions and 4 deletions.
  1. +3 −4 spec/install/git_spec.rb
  2. +30 −0 spec/update/source_spec.rb
View
@@ -28,8 +28,7 @@
Dir["#{default_bundle_path}/cache/bundler/git/foo-1.0-*"].should have(1).item
end
- it "floats on master if no ref is specified" do
- pending_bundle_update
+ it "does not update the git source implicitly" do
update_git "foo"
in_app_root2 do
@@ -42,10 +41,10 @@
in_app_root do
run <<-RUBY
require 'foo'
- puts "WIN" if defined?(FOO_PREV_REF)
+ puts "fail" if defined?(FOO_PREV_REF)
RUBY
- out.should == "WIN"
+ out.should be_empty
end
end
View
@@ -0,0 +1,30 @@
+require "spec_helper"
+
+describe "bundle update" do
+ describe "git sources" do
+ before :each do
+ build_git "foo", :path => lib_path("foo") do |s|
+ s.executables = "foobar"
+ end
+
+ install_gemfile <<-G
+ git "#{lib_path('foo')}"
+ gem 'foo'
+ G
+ end
+
+ it "updates the source" do
+ pending "Needs to be implemented"
+ bundle "update --source foo"
+
+ in_app_root do
+ run <<-RUBY
+ require 'foo'
+ puts "WIN" if defined?(FOO_PREV_REF)
+ RUBY
+
+ out.should == "WIN"
+ end
+ end
+ end
+end

0 comments on commit cd8a563

Please sign in to comment.