Skip to content

Commit

Permalink
Replace deprecated rspec calls
Browse files Browse the repository at this point in the history
  • Loading branch information
larskanis committed Mar 29, 2024
1 parent 0727ada commit 5284b85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/ffi/pointer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,15 @@ def to_ptr

describe "#inspect" do
it "should include the address" do
FFI::Pointer.new(1234).inspect.should =~ /address=0x0*4d2/
expect(FFI::Pointer.new(1234).inspect).to match(/address=0x0*4d2/)
end

it "should not include the size if the pointer is unsized" do
FFI::Pointer.new(1234).inspect.should_not =~ /size=/
expect(FFI::Pointer.new(1234).inspect).not_to match(/size=/)
end

it "should include the size if there is one" do
FFI::MemoryPointer.new(:char, 16).inspect.should =~ /size=16/
expect(FFI::MemoryPointer.new(:char, 16).inspect).to match(/size=16/)
end
end
end
Expand Down

0 comments on commit 5284b85

Please sign in to comment.