Sha256: 28cb9225c0048aea7fa95d0360c110d08d65f7017a2e0f5a98d37d1158c55882

Contents?: true

Size: 711 Bytes

Versions: 13

Compression:

Stored size: 711 Bytes

Contents

require 'test_helper'

module Landrush
  describe ResolverConfig do
    describe 'ensure_config_exists' do
      it 'writes a resolver config on the host if one is not already there' do
        resolver_config = ResolverConfig.new(fake_environment)
        skip("Only supported on OSX") unless resolver_config.osx?

        resolver_config.config_file.exist?.must_equal false
        resolver_config.ensure_config_exists!
        resolver_config.config_file.exist?.must_equal true
        resolver_config.config_file.read.must_equal <<-EOF.gsub(/^ +/, '')
          # Generated by landrush, a vagrant plugin
          nameserver 127.0.0.1
          port #{Server.port}
        EOF
      end


    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
landrush-0.19.0 test/landrush/resolver_config_test.rb
landrush-0.18.0 test/landrush/resolver_config_test.rb
landrush-0.17.0 test/landrush/resolver_config_test.rb
landrush-0.16.0 test/landrush/resolver_config_test.rb
landrush-0.15.4 test/landrush/resolver_config_test.rb
landrush-0.15.3 test/landrush/resolver_config_test.rb
landrush-0.15.2 test/landrush/resolver_config_test.rb
landrush-0.15.1 test/landrush/resolver_config_test.rb
landrush-0.15.0 test/landrush/resolver_config_test.rb
landrush-0.14.1 test/landrush/resolver_config_test.rb
landrush-0.14.0 test/landrush/resolver_config_test.rb
landrush-0.13.1 test/landrush/resolver_config_test.rb
landrush-0.13.0 test/landrush/resolver_config_test.rb