Sha256: 600aac8b0cd9c6c13dd1159c5d014931443d13f965675bc7cca3a617b8887fbf
Contents?: true
Size: 459 Bytes
Versions: 2
Compression:
Stored size: 459 Bytes
Contents
require 'spec_helper' describe Noip::RemoteIp do describe '#address' do let(:ip_address) { '12.34.56.78' } before do allow(Net::HTTP).to receive(:get).and_return(ip_address) end subject(:address) { Noip::RemoteIp.new.address } it { is_expected.to eq '12.34.56.78' } it 'resolves the ip via akamai' do address expect(Net::HTTP).to have_received(:get).with(URI('http://whatismyip.akamai.com')) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
noip-0.2 | spec/noip/remote_ip_spec.rb |
noip-0.1 | spec/noip/remote_ip_spec.rb |