diff options
Diffstat (limited to 'spec/update/git_spec.rb')
-rw-r--r-- | spec/update/git_spec.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/spec/update/git_spec.rb b/spec/update/git_spec.rb new file mode 100644 index 0000000000..31ad77e5ba --- /dev/null +++ b/spec/update/git_spec.rb @@ -0,0 +1,42 @@ +require "spec_helper" + +describe "bundle update" do + describe "git sources" do + it "floats on a branch when :branch is used" do + build_git "foo", "1.0" + update_git "foo", :branch => "omg" + + install_gemfile <<-G + git "#{lib_path('foo-1.0')}", :branch => "omg" + gem 'foo' + G + + update_git "foo", :branch => "omg" do |s| + s.write "lib/foo.rb", "FOO = '1.1'" + end + + bundle "update" + + should_be_installed "foo 1.1" + end + + it "floats on a branch when :branch is used and the source is specified in the update" do + build_git "foo", "1.0", :path => lib_path("foo") + update_git "foo", :branch => "omg", :path => lib_path("foo") + + install_gemfile <<-G + git "#{lib_path('foo')}", :branch => "omg" do + gem 'foo' + end + G + + update_git "foo", :branch => "omg", :path => lib_path("foo") do |s| + s.write "lib/foo.rb", "FOO = '1.1'" + end + + bundle "update --source foo" + + should_be_installed "foo 1.1" + end + end +end
\ No newline at end of file |