Sha256: 6def4e019bec6f5bbf42dbfe266e68eea488cbd5c754868ea2309c0e4f68c624
Contents?: true
Size: 777 Bytes
Versions: 64
Compression:
Stored size: 777 Bytes
Contents
RSpec.describe IPAddr do subject(:ip_address) { IPAddr.new('10.0.0.1') } describe '#==' do it { is_expected.to be == '10.0.0.1'} it { is_expected.to be == IPAddr.new('10.0.0.1')} it { is_expected.not_to be == 'foo'} it 'does not raise an error when compared to a non ip address' do expect { ip_address == 'foo' }.to_not raise_error end end describe '#include?' do subject(:ip_range) { IPAddr.new('10.0.0.1/24') } it { is_expected.to include '10.0.0.1'} it { is_expected.to include ip_address} it { is_expected.not_to include 'foo'} it 'does not raise an error when checking for a non ip address' do expect { ip_range.include? 'foo' }.to_not raise_error end end end
Version data entries
64 entries across 64 versions & 2 rubygems