diff options
Diffstat (limited to 'spec/bundler/cli_spec.rb')
-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 |