diff options
author | Andre Arko <andre@arko.net> | 2015-01-20 22:51:56 -0800 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-01-20 22:51:56 -0800 |
commit | 8774e0062e44a45819fde6e38465f0bb2f5de36c (patch) | |
tree | 3faacb40cab055fa96d2b77f9713e33a6b2f1b61 /spec/other | |
parent | f41a4ed9963ac66fbbcb47ff8bbf6d838e355f1b (diff) | |
download | bundler-8774e0062e44a45819fde6e38465f0bb2f5de36c.tar.gz |
don’t test exitstatus when it is unknown
apparently on some Ruby 1.8.7 installs, open3 doesn’t return an exit
status, and that includes all Travis installs of 1.8.7. :/ these tests
all pass (while checking exit status) on my machine, but they shouldn’t
fail if the Ruby on Travis isn’t able to provide exitstatuses.
Diffstat (limited to 'spec/other')
-rw-r--r-- | spec/other/bundle_ruby_spec.rb | 6 | ||||
-rw-r--r-- | spec/other/platform_spec.rb | 30 |
2 files changed, 18 insertions, 18 deletions
diff --git a/spec/other/bundle_ruby_spec.rb b/spec/other/bundle_ruby_spec.rb index 08d24ee71a..739c3d0ffb 100644 --- a/spec/other/bundle_ruby_spec.rb +++ b/spec/other/bundle_ruby_spec.rb @@ -63,7 +63,7 @@ describe "bundle_ruby" do G bundle_ruby :exitstatus => true - expect(exitstatus).not_to eq(0) + expect(exitstatus).not_to eq(0) if exitstatus bundle_ruby expect(out).to eq("Please define :engine_version") @@ -78,7 +78,7 @@ describe "bundle_ruby" do G bundle_ruby :exitstatus => true - expect(exitstatus).not_to eq(0) + expect(exitstatus).not_to eq(0) if exitstatus bundle_ruby expect(out).to eq("Please define :engine") @@ -93,7 +93,7 @@ describe "bundle_ruby" do G bundle_ruby :exitstatus => true - expect(exitstatus).not_to eq(0) + expect(exitstatus).not_to eq(0) if exitstatus bundle_ruby expect(out).to eq("ruby_version must match the :engine_version for MRI") diff --git a/spec/other/platform_spec.rb b/spec/other/platform_spec.rb index b15f6b2b8a..a2fc9636a0 100644 --- a/spec/other/platform_spec.rb +++ b/spec/other/platform_spec.rb @@ -153,7 +153,7 @@ G bundle "platform" - expect(exitstatus).not_to eq(0) + expect(exitstatus).not_to eq(0) if exitstatus end it "raises an error if engine_version is used but engine is not" do @@ -166,7 +166,7 @@ G bundle "platform" - expect(exitstatus).not_to eq(0) + expect(exitstatus).not_to eq(0) if exitstatus end it "raises an error if engine version doesn't match ruby version for MRI" do @@ -179,7 +179,7 @@ G bundle "platform" - expect(exitstatus).not_to eq(0) + expect(exitstatus).not_to eq(0) if exitstatus end it "should print if no ruby version is specified" do @@ -205,28 +205,28 @@ G let(:patchlevel_incorrect) { "#{ruby_version_correct}, :patchlevel => '#{not_local_patchlevel}'" } let(:patchlevel_fixnum) { "#{ruby_version_correct}, :patchlevel => #{RUBY_PATCHLEVEL}1" } - def should_be_ruby_version_incorrect(opts = {:exitstatus => true}) - expect(exitstatus).to eq(18) if opts[:exitstatus] + def should_be_ruby_version_incorrect + expect(exitstatus).to eq(18) if exitstatus expect(out).to be_include("Your Ruby version is #{RUBY_VERSION}, but your Gemfile specified #{not_local_ruby_version}") end - def should_be_engine_incorrect(opts = {:exitstatus => true}) - expect(exitstatus).to eq(18) if opts[:exitstatus] + def should_be_engine_incorrect + expect(exitstatus).to eq(18) if exitstatus expect(out).to be_include("Your Ruby engine is #{local_ruby_engine}, but your Gemfile specified #{not_local_tag}") end - def should_be_engine_version_incorrect(opts = {:exitstatus => true}) - expect(exitstatus).to eq(18) if opts[:exitstatus] + def should_be_engine_version_incorrect + expect(exitstatus).to eq(18) if exitstatus expect(out).to be_include("Your #{local_ruby_engine} version is #{local_engine_version}, but your Gemfile specified #{local_ruby_engine} #{not_local_engine_version}") end - def should_be_patchlevel_incorrect(opts = {:exitstatus => true}) - expect(exitstatus).to eq(18) if opts[:exitstatus] + def should_be_patchlevel_incorrect + expect(exitstatus).to eq(18) if exitstatus expect(out).to be_include("Your Ruby patchlevel is #{RUBY_PATCHLEVEL}, but your Gemfile specified #{not_local_patchlevel}") end - def should_be_patchlevel_fixnum(opts = {:exitstatus => true}) - expect(exitstatus).to eq(18) if opts[:exitstatus] + def should_be_patchlevel_fixnum + expect(exitstatus).to eq(18) if exitstatus expect(out).to be_include("The Ruby patchlevel in your Gemfile must be a string") end @@ -332,7 +332,7 @@ G G bundle :check - expect(exitstatus).to eq(0) + expect(exitstatus).to eq(0) if exitstatus expect(out).to eq("The Gemfile's dependencies are satisfied") end @@ -351,7 +351,7 @@ G G bundle :check - expect(exitstatus).to eq(0) + expect(exitstatus).to eq(0) if exitstatus expect(out).to eq("The Gemfile's dependencies are satisfied") end end |