Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make sure tests still run in JRuby, where Curb isn't available

  • Loading branch information...
commit 346a8e411e26cf50ade662f3348514cd1d4ee667 1 parent 168423d
@chrisk authored
Showing with 8 additions and 3 deletions.
  1. +1 −1  Rakefile
  2. +6 −1 test/test_curb.rb
  3. +1 −1  test/test_helper.rb
View
2  Rakefile
@@ -15,7 +15,7 @@ begin
gem.authors = ["Chris Kampmeier", "Blaine Cook"]
gem.homepage = "http://github.com/chrisk/fakeweb"
gem.add_development_dependency "mocha", ">= 0.9.5"
- gem.add_development_dependency "curb", ">= 0.5.4"
+ gem.add_development_dependency "curb", ">= 0.5.9.1" unless RUBY_PLATFORM =~ /java/
end
Jeweler::GemcutterTasks.new
Jeweler::RubyforgeTasks.new do |rubyforge|
View
7 test/test_curb.rb
@@ -72,4 +72,9 @@ def test_perform_raises_when_body_handler_returns_non_number
assert warning.include? "test_curb.rb:#{line}: warning: Curl data handlers should return the number of bytes read as an Integer\n"
end
-end
+end
+
+if RUBY_PLATFORM =~ /java/
+ puts "Skipping Curb tests (running under JRuby)"
+ Object.send(:remove_const, :TestCurb)
+end
View
2  test/test_helper.rb
@@ -3,8 +3,8 @@
require 'pathname'
require 'rbconfig'
require 'rubygems'
-require 'curb'
require 'mocha'
+require 'curb' unless RUBY_PLATFORM =~ /java/
require 'fake_web'

0 comments on commit 346a8e4

Please sign in to comment.
Something went wrong with that request. Please try again.