Skip to content

Commit

Permalink
Move a bundle update spec for git into update/source_spec.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Lerche committed May 8, 2010
1 parent d481a28 commit cd8a563
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/install/git_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
30 changes: 30 additions & 0 deletions spec/update/source_spec.rb
Original file line number Diff line number Diff line change
@@ -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.