Sha256: 1e387133088973080d9628ed8cd45c431961ba7f1984db9d856b55074d5af1f7

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

require 'spec_helper'
require 'ffi/libc/ifaddrs'

describe Ifaddrs do
  subject { LibC.each_ifaddr.first }

  it "should have a name" do
    subject.name.should_not be_empty
  end

  it "should have flags" do
    subject.flags.should be_kind_of(Integer)
  end

  it "should have an addr" do
    subject.addr.should be_kind_of(Sockaddr)
  end

  it "should have an netmask" do
    subject.netmask.should be_kind_of(Sockaddr)
  end

  it "should have a broadcast addr" do
    subject.broadaddr.should be_kind_of(Sockaddr)
  end

  it "should have a destination addr" do
    subject.dstaddr.should be_kind_of(Sockaddr)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffi-libc-0.1.0 spec/ifaddrs_spec.rb