From c5eb7f6fdc9345f5d2b964e9e627fa28275c20f2 Mon Sep 17 00:00:00 2001 From: Peter Souter Date: Fri, 24 Mar 2017 11:21:40 +0000 Subject: [PATCH] Updates test for localhost resolution * This test fails on a machine that does not resolve the ipv6 localhost address (eg. a machine where /etc/hosts does not contain `::1 localhost` --- spec/ssh_scan/string_ext_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/ssh_scan/string_ext_spec.rb b/spec/ssh_scan/string_ext_spec.rb index 627eb3c4..1b204f2e 100644 --- a/spec/ssh_scan/string_ext_spec.rb +++ b/spec/ssh_scan/string_ext_spec.rb @@ -42,9 +42,9 @@ context "when resolving a DNS name into IP adress" do testing_host = "localhost" it "should load all the attributes properly" do - expected_result = "::1" + expected_result = /^::1$|^127.0.0.1$/ test_result = testing_host.resolve_fqdn - expect(test_result).to eql(expected_result) + expect(test_result).to match(expected_result) end end