【发布时间】:2016-03-10 19:28:19
【问题描述】:
我得到 URI::InvalidURIError 测试 Rails Home 控制器:
require 'test_helper'
class HomeControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get :index
assert_response :success
end
end
得到以下错误:
E
Error:
HomeControllerTest#test_should_get_index:
URI::InvalidURIError: bad URI(is not URI?): http://www.example.com:80index
test/controllers/home_controller_test.rb:7:in `block in <class:HomeControllerTest>'
堆栈如下:
Rails 5.0.0.beta3
minitest (5.8.4)
【问题讨论】:
标签: ruby-on-rails ruby controller tdd minitest