Use is_expected
parent
764af20567
commit
5a0b6ece6e
|
@ -39,7 +39,7 @@ describe Rex::Socket do
|
|||
|
||||
context 'with ipv6' do
|
||||
let(:try) { "fe80::1" }
|
||||
it { expect(subject).to be_an(String) }
|
||||
it { is_expected.to be_an(String) }
|
||||
it { expect(subject.bytes.count).to eq(16) }
|
||||
it "should be in the right order" do
|
||||
nbo.should == "\xfe\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01"
|
||||
|
@ -48,7 +48,7 @@ describe Rex::Socket do
|
|||
|
||||
context 'with ipv4' do
|
||||
let(:try) { "127.0.0.1" }
|
||||
it { expect(subject).to be_an(String) }
|
||||
it { is_expected.to be_an(String) }
|
||||
it { expect(subject.bytes.count).to eq(4) }
|
||||
it "should be in the right order" do
|
||||
nbo.should == "\x7f\x00\x00\x01"
|
||||
|
@ -131,7 +131,7 @@ describe Rex::Socket do
|
|||
let(:response_afamily) { Socket::AF_INET }
|
||||
let(:response_addresses) { ["\x01\x01\x01\x01", "\x02\x02\x02\x02"] }
|
||||
|
||||
it { expect(subject).to be_an(Array) }
|
||||
it { is_expected.to be_an(Array) }
|
||||
it { expect(subject.size).to eq(2) }
|
||||
it "should return the ASCII addresses" do
|
||||
subject.should include("1.1.1.1")
|
||||
|
@ -143,7 +143,7 @@ describe Rex::Socket do
|
|||
let(:response_afamily) { Socket::AF_INET6 }
|
||||
let(:response_addresses) { ["\xfe\x80"+("\x00"*13)+"\x01", "\xfe\x80"+("\x00"*13)+"\x02"] }
|
||||
|
||||
it { expect(subject).to be_an(Array) }
|
||||
it { is_expected.to be_an(Array) }
|
||||
it { expect(subject.size).to eq(2) }
|
||||
it "should return the ASCII addresses" do
|
||||
subject.should include("fe80::1")
|
||||
|
@ -155,7 +155,7 @@ describe Rex::Socket do
|
|||
let(:response_afamily) { Socket::AF_INET }
|
||||
let(:response_addresses) { ["1.1.1.1", "2.2.2.2"] }
|
||||
|
||||
it { expect(subject).to be_an(Array) }
|
||||
it { is_expected.to be_an(Array) }
|
||||
it { expect(subject.size).to eq(2) }
|
||||
it "should return the ASCII addresses" do
|
||||
subject.should include("1.1.1.1")
|
||||
|
|
Loading…
Reference in New Issue