summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrismo <chrismo@clabs.org>2016-12-22 23:53:31 -0600
committerchrismo <chrismo@clabs.org>2016-12-23 00:02:05 -0600
commitbec3336952e885126362cd93b378ae98240338d5 (patch)
treeee366de332cebc591dd5499c45ee4277e2cf0b09
parent4f3e0ec66d6f72d00b552959db1dae89b83b4a4e (diff)
downloadbundler-bec3336952e885126362cd93b378ae98240338d5.tar.gz
Specs for multiple platform bug fix in outdated.
This supersedes PR #4734, which fixed a bug but didn't have proper spec coverage. Since that PR was submitted, a different commit (291a807c in PR #5176) fixed a similar bug at the same time. That caused a merge conflict in #4734. It was unknown if the same fix fixed both bugs, since there were no successfully implemented specs. These specs show that the bug was properly fixed. These specs were mostly already implemented by @b-ggs, just needed a little additional guidance.
-rw-r--r--spec/commands/outdated_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/commands/outdated_spec.rb b/spec/commands/outdated_spec.rb
index a3e46a4e7f..e335ee9144 100644
--- a/spec/commands/outdated_spec.rb
+++ b/spec/commands/outdated_spec.rb
@@ -427,6 +427,33 @@ describe "bundle outdated" do
end
end
+ context "update available for a gem on the same platform while multiple platforms used for gem" do
+ it "reports that updates are available if the Ruby platform is used" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "laduradura", '= 5.15.2', :platforms => [:ruby, :jruby]
+ G
+
+ bundle "outdated"
+ expect(out).to include("Bundle up to date!")
+ end
+
+ it "reports that updates are available if the JRuby platform is used" do
+ simulate_ruby_engine "jruby", "1.6.7" do
+ simulate_platform "jruby" do
+ install_gemfile <<-G
+ source "file://#{gem_repo2}"
+ gem "laduradura", '= 5.15.2', :platforms => [:ruby, :jruby]
+ G
+
+ bundle "outdated"
+ expect(out).to include("Outdated gems included in the bundle:")
+ expect(out).to include("laduradura (newest 5.15.3, installed 5.15.2, requested = 5.15.2)")
+ end
+ end
+ end
+ end
+
shared_examples_for "version update is detected" do
it "reports that a gem has a newer version" do
subject