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

describe "UNIXSocket.new" do
  it_behaves_like :unixsocket_new, :new

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