summaryrefslogtreecommitdiff
path: root/spec/resolver/platform_spec.rb
diff options
context:
space:
mode:
authorCarl Lerche <carllerche@mac.com>2010-06-03 15:32:32 -0700
committerCarl Lerche <carllerche@mac.com>2010-06-03 17:09:14 -0700
commit3edfddbf7ebe4b942e1e2b6d693afd582e9a8147 (patch)
treed3c9c1da2a060c23f00d58172830089e1e7d0089 /spec/resolver/platform_spec.rb
parentabf42df5e20d11ea381848655edc71df4449fe84 (diff)
downloadbundler-3edfddbf7ebe4b942e1e2b6d693afd582e9a8147.tar.gz
Hacked together some crap that doesn't really work
Diffstat (limited to 'spec/resolver/platform_spec.rb')
-rw-r--r--spec/resolver/platform_spec.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/resolver/platform_spec.rb b/spec/resolver/platform_spec.rb
new file mode 100644
index 0000000000..bc7bce4518
--- /dev/null
+++ b/spec/resolver/platform_spec.rb
@@ -0,0 +1,43 @@
+require "spec_helper"
+
+describe "Resolving platform craziness" do
+ describe "with semi real cases" do
+ before :each do
+ @index = an_awesome_index
+ end
+
+ it "resolves a simple multi platform gem" do
+ dep "nokogiri"
+ platforms "ruby", "java"
+
+ should_resolve_as %w(nokogiri-1.4.2.1 nokogiri-1.4.2.1-java weakling-0.0.3)
+ end
+ end
+
+ describe "with conflicting cases" do
+ before :each do
+ @index = build_index do
+ gem "foo", "1.0.0" do
+ dep "bar", ">= 0"
+ end
+
+ gem 'bar', "1.0.0" do
+ dep "baz", "~> 1.0.0"
+ end
+
+ gem "bar", "1.0.0", "java" do
+ dep "baz", " ~> 1.1.0"
+ end
+
+ gem "baz", %w(1.0.0 1.1.0 1.2.0)
+ end
+ end
+
+ it "does something" do
+ platforms "ruby", "java"
+ dep "foo"
+
+ should_conflict_on "baz"
+ end
+ end
+end \ No newline at end of file