我有没有测试的应用程序,现在我正在尝试添加它们(minitest-rails),但是出了点问题。我正在打字rails generate controller test test
,我有:
require "minitest_helper"
class TestControllerTest < MiniTest::Rails::ActionController::TestCase
test "should get test" do
get :test
assert_response :success
end
end
现在我正在打字rake test
并Expected response to be a <success>, but was <301>
发生错误。问题出在哪里?
编辑: 我的控制器的代码:
class TestController < ApplicationController
def test
end
end