我需要用 minitest 测试我的控制器。我试过了:
describe 'CommentsController' do
it "should get index" do
get :index
assert_response :success
end
end
和
class CommentsControllerTest < MiniTest::Unit::TestCase
def test_should_get_index
get :index
assert_response :success
end
end
但我有“未定义的方法‘get’”错误