spec/dns_spec.rb in em-http-request-1.1.5 vs spec/dns_spec.rb in em-http-request-1.1.6
- old
+ new
@@ -5,11 +5,11 @@
it "should fail gracefully on an invalid host in Location header" do
EventMachine.run {
http = EventMachine::HttpRequest.new('http://127.0.0.1:8090/redirect/badhost', :connect_timeout => 0.1).get :redirects => 1
http.callback { failed(http) }
http.errback {
- http.error.should match('unable to resolve server address')
+ http.error.should match(/unable to resolve (server |)address/)
EventMachine.stop
}
}
end
@@ -29,10 +29,10 @@
EventMachine.run {
EventMachine.heartbeat_interval = 0.1
http = EventMachine::HttpRequest.new('http://somethinglocal/', :connect_timeout => 0.1).get
http.callback { failed(http) }
http.errback {
- http.error.should match(/unable to resolve server address/)
+ http.error.should match(/unable to resolve (server |)address/)
http.response_header.status.should == 0
EventMachine.stop
}
}
end