summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/unixserver/new_spec.rb
blob: 7d0c7bf76ee194c6c3b867b2f8867f6b0e801eb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
require_relative '../spec_helper'
require_relative 'shared/new'

describe "UNIXServer.new" do
  it_behaves_like :unixserver_new, :new

  it "does not use the given block and warns to use UNIXServer::open" do
    -> {
      @server = UNIXServer.new(@path) { raise }
    }.should complain(/warning: UNIXServer::new\(\) does not take block; use UNIXServer::open\(\) instead/)
  end
end