ruby-changes:56064
From: Benoit <ko1@a...>
Date: Mon, 10 Jun 2019 19:48:08 +0900 (JST)
Subject: [ruby-changes:56064] Benoit Daloze: 626ae5a9b6 (trunk): Resolv specs should pass on Windows now
https://git.ruby-lang.org/ruby.git/commit/?id=626ae5a9b6 From 626ae5a9b6531412f598b2f37a15821628857707 Mon Sep 17 00:00:00 2001 From: Benoit Daloze <eregontp@g...> Date: Mon, 10 Jun 2019 12:47:08 +0200 Subject: Resolv specs should pass on Windows now diff --git a/spec/ruby/library/resolv/get_address_spec.rb b/spec/ruby/library/resolv/get_address_spec.rb index eecf5e0..baa2b11 100644 --- a/spec/ruby/library/resolv/get_address_spec.rb +++ b/spec/ruby/library/resolv/get_address_spec.rb @@ -2,14 +2,12 @@ require_relative '../../spec_helper' https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/resolv/get_address_spec.rb#L2 require 'resolv' describe "Resolv#getaddress" do - platform_is_not :windows do - it "resolves localhost" do - hosts = Resolv::Hosts.new(fixture(__FILE__ , "hosts")) - res = Resolv.new([hosts]) + it "resolves localhost" do + hosts = Resolv::Hosts.new(fixture(__FILE__ , "hosts")) + res = Resolv.new([hosts]) - res.getaddress("localhost").should == "127.0.0.1" - res.getaddress("localhost4").should == "127.0.0.1" - end + res.getaddress("localhost").should == "127.0.0.1" + res.getaddress("localhost4").should == "127.0.0.1" end it "raises ResolvError if the name can not be looked up" do diff --git a/spec/ruby/library/resolv/get_addresses_spec.rb b/spec/ruby/library/resolv/get_addresses_spec.rb index 7e89c3c..b84f29b 100644 --- a/spec/ruby/library/resolv/get_addresses_spec.rb +++ b/spec/ruby/library/resolv/get_addresses_spec.rb @@ -2,13 +2,11 @@ require_relative '../../spec_helper' https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/resolv/get_addresses_spec.rb#L2 require 'resolv' describe "Resolv#getaddresses" do - platform_is_not :windows do - it "resolves localhost" do - hosts = Resolv::Hosts.new(fixture(__FILE__ , "hosts")) - res = Resolv.new([hosts]) + it "resolves localhost" do + hosts = Resolv::Hosts.new(fixture(__FILE__ , "hosts")) + res = Resolv.new([hosts]) - res.getaddresses("localhost").should == ["127.0.0.1"] - res.getaddresses("localhost4").should == ["127.0.0.1"] - end + res.getaddresses("localhost").should == ["127.0.0.1"] + res.getaddresses("localhost4").should == ["127.0.0.1"] end end diff --git a/spec/ruby/library/resolv/get_name_spec.rb b/spec/ruby/library/resolv/get_name_spec.rb index 006014b..70b91e1 100644 --- a/spec/ruby/library/resolv/get_name_spec.rb +++ b/spec/ruby/library/resolv/get_name_spec.rb @@ -2,13 +2,11 @@ require_relative '../../spec_helper' https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/resolv/get_name_spec.rb#L2 require 'resolv' describe "Resolv#getname" do - platform_is_not :windows do - it "resolves 127.0.0.1" do - hosts = Resolv::Hosts.new(fixture(__FILE__ , "hosts")) - res = Resolv.new([hosts]) + it "resolves 127.0.0.1" do + hosts = Resolv::Hosts.new(fixture(__FILE__ , "hosts")) + res = Resolv.new([hosts]) - res.getname("127.0.0.1").should == "localhost" - end + res.getname("127.0.0.1").should == "localhost" end it "raises ResolvError when there is no result" do diff --git a/spec/ruby/library/resolv/get_names_spec.rb b/spec/ruby/library/resolv/get_names_spec.rb index 897e24e..c405360 100644 --- a/spec/ruby/library/resolv/get_names_spec.rb +++ b/spec/ruby/library/resolv/get_names_spec.rb @@ -2,12 +2,10 @@ require_relative '../../spec_helper' https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/resolv/get_names_spec.rb#L2 require 'resolv' describe "Resolv#getnames" do - platform_is_not :windows do - it "resolves 127.0.0.1" do - hosts = Resolv::Hosts.new(fixture(__FILE__ , "hosts")) - res = Resolv.new([hosts]) + it "resolves 127.0.0.1" do + hosts = Resolv::Hosts.new(fixture(__FILE__ , "hosts")) + res = Resolv.new([hosts]) - names = res.getnames("127.0.0.1").should == ["localhost", "localhost4"] - end + names = res.getnames("127.0.0.1").should == ["localhost", "localhost4"] end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/