0

我有没有测试的应用程序,现在我正在尝试添加它们(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 testExpected response to be a <success>, but was <301>发生错误。问题出在哪里?

编辑: 我的控制器的代码:

class TestController < ApplicationController
  def test
  end
end
4

1 回答 1

3

我已经解决了!刚刚删除force_ssl并添加config.force_ssl = true到生产配置中。

于 2012-07-27T13:51:43.723 回答