Permalink
Browse files

Exclude UNIXSocket tests under Windows

  • Loading branch information...
luislavena committed Jan 8, 2012
1 parent 9470937 commit af609a1f90009d7f7c286b934ac57c1d7d1734f1
Showing with 6 additions and 4 deletions.
  1. +2 −2 test/test_integration.rb
  2. +4 −2 test/test_unix_socket.rb
View
@@ -1,5 +1,5 @@
+require "rbconfig"
require 'test/unit'
-require 'rubygems'
require 'socket'
require 'puma/cli'
@@ -19,7 +19,7 @@ def teardown
end
def test_stop_via_pumactl
- if defined? JRUBY_VERSION
+ if defined?(JRUBY_VERSION) || RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
assert true
return
end
View
@@ -1,10 +1,12 @@
+require "rbconfig"
require 'test/unit'
require 'puma/server'
require 'socket'
# UNIX sockets are not recommended on JRuby
-unless defined?(JRUBY_VERSION)
+# (or Windows)
+unless defined?(JRUBY_VERSION) || RbConfig::CONFIG["host_os"] =~ /mingw|mswin/
class TestPumaUnixSocket < Test::Unit::TestCase
App = lambda { |env| [200, {}, ["Works"]] }
@@ -34,4 +36,4 @@ def test_server
sock.close
end
end
-end
+end

0 comments on commit af609a1

Please sign in to comment.