aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2010-04-19 18:40:10 -0700
committerAndre Arko <andre@arko.net>2010-04-23 10:01:12 -0700
commit33cd28bbc11f8ea38f1413823de4f18b84d9d775 (patch)
tree36c0114a8edd7f1b6b27664f63fe2099bb86d9ea /spec/support
parent2c88f252df04db3f3c61fa3ab282b55a07b07126 (diff)
downloadbundler-33cd28bbc11f8ea38f1413823de4f18b84d9d775.tar.gz
Fix platform specs so they are actually _capable_ of failing
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/builders.rb5
-rw-r--r--spec/support/platforms.rb10
2 files changed, 12 insertions, 3 deletions
diff --git a/spec/support/builders.rb b/spec/support/builders.rb
index bb80c1d0..4ace2615 100644
--- a/spec/support/builders.rb
+++ b/spec/support/builders.rb
@@ -83,6 +83,11 @@ module Spec
s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0.0 RUBY'"
end
+ build_gem "platform_specific" do |s|
+ s.platform = "x86-mswin32"
+ s.write "lib/platform_specific.rb", "PLATFORM_SPECIFIC = '1.0.0 MSWIN'"
+ end
+
build_gem "only_java" do |s|
s.platform = "java"
end
diff --git a/spec/support/platforms.rb b/spec/support/platforms.rb
index 2598488b..09f4dcda 100644
--- a/spec/support/platforms.rb
+++ b/spec/support/platforms.rb
@@ -1,15 +1,19 @@
module Spec
module Platforms
def rb
- Gem::Platform::RUBY
+ %|Gem::Platform::RUBY|
end
def java
- Gem::Platform.new [nil, "java", nil]
+ %|Gem::Platform.new([nil, "java", nil])|
end
def linux
- Gem::Platform.new ['x86', 'linux', nil]
+ %|Gem::Platform.new(['x86', 'linux', nil])|
+ end
+
+ def mswin
+ %|Gem::Platform.new(['x86', 'mswin32', nil])|
end
end
end \ No newline at end of file