Sha256: 0bbfa70c55e72c9f797800109021d37e23a5731fcef934343a1c3654e49de7d2
Contents?: true
Size: 1.14 KB
Versions: 9
Compression:
Stored size: 1.14 KB
Contents
shared_examples_for '.ignore_localhost? deprecation' do it 'returns false when no hosts are ignored' do VCR::Config.ignored_hosts.should be_empty described_class.ignore_localhost?.should be_false end it 'returns false when only non-local hosts are ignored' do VCR::Config.ignore_hosts 'example.com' described_class.ignore_localhost?.should be_false end it 'returns false when only some localhost aliases are ignored' do aliases = VCR::LOCALHOST_ALIASES.dup aliases.pop VCR::Config.ignore_hosts *aliases described_class.ignore_localhost?.should be_false end it 'returns true when all localhost aliases are ignored, even if some other hosts are ignored, too' do VCR::Config.ignore_hosts 'example.com', *VCR::LOCALHOST_ALIASES described_class.ignore_localhost?.should be_true end it 'prints a warning: WARNING: `VCR::Config.ignore_localhost?` is deprecated. Check the list of ignored hosts using `VCR::Config.ignored_hosts` instead.' do VCR::Config.should_receive(:warn).with(/Check the list of ignored hosts using `VCR::Config.ignored_hosts` instead/) described_class.ignore_localhost? end end
Version data entries
9 entries across 9 versions & 1 rubygems