なぜこれがうまくいかないのでしょうか?
について話している人もwebrat
いますが、Rails はフォームのサインアップを直接処理することになっているのではないでしょうか?
User#Create
以下のテストではアクションがトリガーされません。何も起こらないようです。
test "should not sign up more than 5 users" do
get "signup"
assert_response :success
assert_difference('User.count',5) do
for i in 0..10 do
puts "Signup user"
post_via_redirect "/signup",
:first_name => "Petter",
:last_name => "Smart",
:email => "petter.smart<%=i%>@prayalot.com",
:password => '123456',
:password_confirmation => '123456'
assert_equal '/sentmail', path
end
end
end