Sha256: db314032aada7780d3c85ae978ad5eb0fcc0dc88e55450a1ce6786f5f3b82723

Contents?: true

Size: 628 Bytes

Versions: 4

Compression:

Stored size: 628 Bytes

Contents

require 'spec_helper'

require 'vagrant-hosts/addresses'

describe 'VagrantHosts::Addresses' do
  subject do
    # A simple class which simulates inclusion of VagrantHosts::Addresses
    Class.new do
      include VagrantHosts::Addresses
      # Expose private methods included above for testing.
      public *self.private_instance_methods
    end.new
  end

  describe '#resolve_ip' do
    it 'raises an error when passed an unresolvable hostname' do
      expect{ subject.resolve_ip('somewhere.bogusdomain') }.to \
        raise_error(VagrantHosts::Addresses::UnresolvableHostname, /somewhere.bogusdomain/)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vagrant-hosts-2.9.0 spec/unit/addresses_spec.rb
vagrant-hosts-2.8.3 spec/unit/addresses_spec.rb
vagrant-hosts-2.8.2 spec/unit/addresses_spec.rb
vagrant-hosts-2.8.1 spec/unit/addresses_spec.rb