the code that didn't work:
login_form = page.form_with(:method => 'post')
and code that works
login_form = page.form_with(:method => 'POST')
I inspected the form object via puts page.forms.inspect
and got
[#<WWW::Mechanize::Form
{name nil}
{method "POST"}
....]
html source:
<form class="login" method="post"> <fieldset>
<legend>Members Login</legend>
<div>
<label for="auth_username">Username</label> <input id="auth_username" name="auth_username">
</div>
<div>
<label for="auth_password">Password</label> <input id="auth_password" name="auth_password" type="password">
</div>
</fieldset>
<div class="buttons">
<input name="auth_login" type="submit" value="Login"><p class="note"><a href="/forgotpassword">Forgot your password?</a></p>
</div>
</form>