spec/invoker/config_spec.rb in invoker-1.0.4 vs spec/invoker/config_spec.rb in invoker-1.1.0

- old
+ new

@@ -144,6 +144,27 @@ ensure File.delete("/tmp/Procfile") end end end + + describe "Copy of DNS information" do + it "should allow copy of DNS information" do + begin + File.open("/tmp/Procfile", "w") {|fl| + fl.write <<-EOD +web: bundle exec rails s -p $PORT + EOD + } + Invoker.load_invoker_config("/tmp/Procfile", 9000) + dns_cache = Invoker::DNSCache.new(Invoker.config) + + expect(dns_cache.dns_data).to_not be_empty + expect(dns_cache.dns_data['web']).to_not be_empty + expect(dns_cache.dns_data['web']['port']).to eql 9001 + ensure + File.delete("/tmp/Procfile") + end + end + end + end