diff options
author | Carlhuda <carlhuda@engineyard.com> | 2009-12-09 15:22:09 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2009-12-09 15:22:09 -0800 |
commit | 3f926f0dfce2675d5d1c936869b20a106ce07285 (patch) | |
tree | 069ada00140aa071dfccaf94d8e86a0df758f8b2 /spec | |
parent | 327af9c55c8dbf9b3e0ee280446d083a3279b393 (diff) | |
download | bundler-3f926f0dfce2675d5d1c936869b20a106ce07285.tar.gz |
Cleanup after geminstalls that don't finish because of errors. Closes #106.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/cli_spec.rb | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb index 4a95cd3a50..f90d24aacb 100644 --- a/spec/bundler/cli_spec.rb +++ b/spec/bundler/cli_spec.rb @@ -9,6 +9,13 @@ describe "Bundler::CLI" do source "file://#{gem_repo1}" gem "very_simple_binary" Gemfile + + File.open("#{bundled_app}/build.yml", "w+") do |file| + file.puts <<-build_options.gsub(/^ /, '') + very_simple_binary: + simple: wot + build_options + end end it "fails if the option is not provided" do @@ -20,13 +27,6 @@ describe "Bundler::CLI" do end it "passes if a yaml is specified that contains the necessary options" do - File.open("#{bundled_app}/build.yml", "w+") do |file| - file.puts <<-build_options.gsub(/^ /, '') - very_simple_binary: - simple: wot - build_options - end - Dir.chdir(bundled_app) do @output = gem_command :bundle, "--build-options=build.yml 2>&1" end @@ -40,6 +40,19 @@ describe "Bundler::CLI" do out.should == "VerySimpleBinaryInC" end + + it "does not skip the binary gem if compiling failed in a previous bundle" do + Dir.chdir(bundled_app) + + gem_command :bundle, "--backtrace 2>&1" # will fail + gem_command :bundle, "--build-options=build.yml 2>&1" + + out = run_in_context <<-RUBY + require "very_simple_binary" + puts VerySimpleBinaryInC + RUBY + out.should == "VerySimpleBinaryInC" + end end describe "it working" do |