Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 346a8e411e26cf50ade662f3348514cd1d4ee667 1 parent 168423d
Chris Kampmeier authored

Showing 3 changed files with 8 additions and 3 deletions. Show diff stats Hide diff stats

  1. +1 1  Rakefile
  2. +6 1 test/test_curb.rb
  3. +1 1  test/test_helper.rb
2  Rakefile
@@ -15,7 +15,7 @@ begin
15 15 gem.authors = ["Chris Kampmeier", "Blaine Cook"]
16 16 gem.homepage = "http://github.com/chrisk/fakeweb"
17 17 gem.add_development_dependency "mocha", ">= 0.9.5"
18   - gem.add_development_dependency "curb", ">= 0.5.4"
  18 + gem.add_development_dependency "curb", ">= 0.5.9.1" unless RUBY_PLATFORM =~ /java/
19 19 end
20 20 Jeweler::GemcutterTasks.new
21 21 Jeweler::RubyforgeTasks.new do |rubyforge|
7 test/test_curb.rb
@@ -72,4 +72,9 @@ def test_perform_raises_when_body_handler_returns_non_number
72 72 assert warning.include? "test_curb.rb:#{line}: warning: Curl data handlers should return the number of bytes read as an Integer\n"
73 73 end
74 74
75   -end
  75 +end
  76 +
  77 +if RUBY_PLATFORM =~ /java/
  78 + puts "Skipping Curb tests (running under JRuby)"
  79 + Object.send(:remove_const, :TestCurb)
  80 +end
2  test/test_helper.rb
@@ -3,8 +3,8 @@
3 3 require 'pathname'
4 4 require 'rbconfig'
5 5 require 'rubygems'
6   -require 'curb'
7 6 require 'mocha'
  7 +require 'curb' unless RUBY_PLATFORM =~ /java/
8 8
9 9 require 'fake_web'
10 10

0 comments on commit 346a8e4

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