diff options
Diffstat (limited to 'test/test_middleware_unicorn_ipv6.rb')
-rw-r--r-- | test/test_middleware_unicorn_ipv6.rb | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/test/test_middleware_unicorn_ipv6.rb b/test/test_middleware_unicorn_ipv6.rb index 6f00cb1..edc9d85 100644 --- a/test/test_middleware_unicorn_ipv6.rb +++ b/test/test_middleware_unicorn_ipv6.rb @@ -1,23 +1,6 @@ # -*- encoding: binary -*- -require "test/unit" -require "raindrops" -require "rack" -require "rack/lobster" -require "open-uri" -begin - require "unicorn" -rescue => e - warn "W: #{e} skipping test since Unicorn was not found" -end - -begin - tmp = TCPServer.new(ENV["TEST_HOST6"] || '::1', 0) - ipv6_enabled = true -rescue => e - warn "skipping IPv6 tests, host does not seem to be IPv6 enabled:" - warn " #{e.class}: #{e}" - ipv6_enabled = false -end +require "./test/rack_unicorn" +require "./test/ipv6_enabled" $stderr.sync = $stdout.sync = true class TestMiddlewareUnicornIPv6 < Test::Unit::TestCase @@ -51,5 +34,4 @@ class TestMiddlewareUnicornIPv6 < Test::Unit::TestCase _, status = Process.waitpid2 @srv assert status.success? end -end if defined?(Unicorn) && RUBY_PLATFORM =~ /linux/ && ipv6_enabled - +end if defined?(Unicorn) && RUBY_PLATFORM =~ /linux/ && ipv6_enabled? |