请问rails的测试get这么写报错?

这是我的ruby 和rails版本
clipboard.png

require 'test_helper'

class SayControllerTest < ActionDispatch::IntegrationTest
  test "should get hello" do
    get say_hello_url
    assert_response :success
  end
  test "should say hello in json" do
    get say_hello_url
    assert_equal "{\"hello\":\"Rails!\"}", @response.body
  end
  test "should say hello in json" do
    get say_hello_url,{'user'=>"Join"}
    assert_equal "{\"hello\":\"Join!\"}", @response.body
  end
end

第三段代码报错

阅读 2.3k
1 个回答

Join后面有一个有感叹号,有一个没有

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进