From thomas at randspringer.de Mon Feb 21 10:11:37 2011 From: thomas at randspringer.de (thomas at randspringer.de) Date: Mon, 21 Feb 2011 16:11:37 +0100 (CET) Subject: [Mechanize-users] redirect ignored? Message-ID: <874310611.1069182.1298301097538.JavaMail.open-xchange@oxltgw14.schlund.de> Hi, ? I'm doing my first steps with ? cucumber (0.10.0) webrat (0.7.3) mechanize (1.0.0)? ? under rails (3.0.4). ? As a first test I tried to check our login dialog. It worked basically (I see the successful login procedure in the server.log) but after a successfully login the user is redirected to ? ? "redirect_to root_url" in the rails code. ? And there I get an error in my cucumber test: ? >snip ?... ?You are being redirected. (RSpec::Expectations::ExpectationNotMetError) >snip ? I found this patch suggestion: http://www.42.mach7x.com/2011/01/03/webrat-0-7-2-problem-with-rails-3-0-3/ but it did not help. ? My workaround is now that I do a "visit root_url" before I "response_body.should contain(welcome)" ? but the first line should not be necessary. ? Any help available? ? Thomas ? ? ? ? ? ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From threewayhandshake at gmail.com Wed Feb 23 08:30:30 2011 From: threewayhandshake at gmail.com (m_takao) Date: Wed, 23 Feb 2011 22:30:30 +0900 Subject: [Mechanize-users] a strange RedirectLimitReachedError Message-ID: Hello. I tried to get "http://www.amazon.co.jp/dp/B001WAL592" with Mechanize, but RedirectLimitReachedError occurred. with TCPSocket, server returned 200 OK and Location was not found in header. It seems Mechanize's bug. ruby 1.8.7 mechanize 1.0.0