您好我最近继承了一个项目,其中前开发人员不熟悉rails,并决定将许多重要的逻辑放入视图助手中。 class ApplicationController < ActionController::Base
protect_from_forgery
include SessionsHelper
include BannersHelper
include User
我想在我的Ruby on Rails 3应用程序中测试我的authlogic代码,并遇到了一些麻烦测试我的用户控制器。 这是我的用户控制器 class UsersControllerTest < ActionController::TestCase
test "should be asked to login on show action" do
get :index
在Rails的自动生成功能测试(test/functional/products_controller_test.rb),我看到了下面的代码: 在哪里/是怎样的: class ProductsControllerTest < ActionController::TestCase
setup do
@product = products(:one)
...
e