~/Sites/sample_app$ rails test
Running via Spring preloader in process 24338
Run options: --seed 58780
Running:
..
Finished in 0.292172s, 6.8453 runs/s, 6.8453 assertions/s.
/var/lib/gems/2.3.0/gems/railties-5.1.0/lib/rails/test_unit/minitest_plugin.rb:9:in `aggregated_results': wrong number of arguments (given 1, expected 0) (ArgumentError)
我不明白为什么我会收到这个错误。我似乎找不到任何有此特定错误的人。我正在关注教程https://www.railstutorial.org/book/static_pages。此错误遵循 rails test 命令。如果有帮助,请运行 Ubuntu 和 rails 5.1。我没有传递任何参数,所以我不明白为什么我会收到这个错误。
我的测试文件如下所示:
require 'test_helper'
class StaticPagesControllerTest < ActionDispatch::IntegrationTest
test "should get home" do
get static_pages_home_url
assert_response :success
end
test "should get help" do
get static_pages_help_url
assert_response :success
end