File: spec_helper.rb

package info (click to toggle)
ruby-cool.io 1.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 716 kB
  • sloc: ansic: 6,851; ruby: 1,730; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 381 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$LOAD_PATH.unshift File.dirname(__FILE__)
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)

require 'rspec'
require 'cool.io'

def unused_port
  s = TCPServer.open(0)
  port = s.addr[1]
  s.close
  port
end

RSpec.configure do |c|
  if RUBY_PLATFORM =~ /mingw|mswin/
    $stderr.puts "Skip some specs on Windows"
    c.filter_run_excluding :env => :exclude_win
  end
end