From a14beed25e17ea3e308e658b66293b42f0ee4bed Mon Sep 17 00:00:00 2001 From: byplayer Date: Thu, 3 Jun 2010 01:57:50 +0900 Subject: [PATCH 05/11] implement spec that don't follow external redirects --- spec/integration/mechanize/spec/mechanize_spec.rb | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/integration/mechanize/spec/mechanize_spec.rb b/spec/integration/mechanize/spec/mechanize_spec.rb index 90635c8..01b5c69 100644 --- a/spec/integration/mechanize/spec/mechanize_spec.rb +++ b/spec/integration/mechanize/spec/mechanize_spec.rb @@ -23,9 +23,8 @@ describe "Webrat's Mechanize mode" do end it "should not follow external redirects" do - pending do - response = visit("http://localhost:9292/external_redirect") - response.should contain("Foo") - end + response = visit("http://#{TEST_HOST}/external_redirect") + response.uri.to_s.should == "http://#{TEST_HOST}/external_redirect" + response.header['location'].should == "http://example.test/" end end -- 1.7.1