[英]how to test controllers with rspec
please give any link for tutorial for controllers testing with rspec, how to start I am not able to do, I am the beginner in testing, here is the code of controller:请提供有关使用rspec进行控制器测试的教程的任何链接,如何开始我无法做到,我是测试的初学者,这是控制器的代码:
def login
if admin_logged_in?
flash[:notice]="You are already logged in"
redirect_to( "/admin/")
else
render(:layout => "admin")
end
end
how to test for this method.如何测试这种方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.