spec/libc_spec.rb in ffi-libc-0.1.0 vs spec/libc_spec.rb in ffi-libc-0.1.1
- old
+ new
@@ -3,34 +3,34 @@
describe FFI::LibC do
describe "NULL" do
subject { described_class::NULL }
- it { should == nil }
+ it { expect(subject).to be == nil }
end
describe "each_ifaddr" do
it "should yield Ifaddrs" do
addrs = []
described_class.each_ifaddr do |ifaddr|
addrs << ifaddr
end
- addrs.all? { |addr| addr.kind_of?(Ifaddrs) }.should be_true
+ expect(addrs).to all(be_kind_of(Ifaddrs))
end
context "when not given a block" do
subject { described_class.each_ifaddr }
- it { should be_kind_of(Enumerable) }
+ it { expect(subject).to be_kind_of(Enumerable) }
end
end
describe "rusage" do
subject { described_class.rusage }
it "should be able to fetch its own memory usage" do
- subject[:ru_maxrss].should be > 4000
+ expect(subject[:ru_maxrss]).to be > 4000
end
end
end