完整的错误信息:
1) RelationshipsController creating a relationship with Ajax should increment the Relationship count
Failure/Error: xhr :post, :create, relationship: { followed_id: other_user.id }
ArgumentError: bad argument (expected URI object or URI string)
# ./spec/requests/relationships_controller_spec.rb:14:in `block (4 levels) in <top (required)>'
# ./spec/requests/relationships_controller_spec.rb:13:in `block (3 levels) in <top (required)>'
2) RelationshipsController creating a relationship with Ajax should respond with success
Failure/Error: xhr :post, :create, relationship: { followed_id: other_user.id }
ArgumentError: bad argument (expected URI object or URI string)
# ./spec/requests/relationships_controller_spec.rb:19:in `block (3 levels) in <top (required)>'
3) RelationshipsController destroying a relationship with Ajax should decrement the Relationship count
Failure/Error: xhr :delete, :destroy, id: relationship.id
ArgumentError: bad argument (expected URI object or URI string)
# ./spec/requests/relationships_controller_spec.rb:31:in `block (4 levels) in <top (required)>'
# ./spec/requests/relationships_controller_spec.rb:30:in `block (3 levels) in <top (required)>'
4) RelationshipsController destroying a relationship with Ajax should respond with success
Failure/Error: xhr :delete, :destroy, id: relationship.id
ArgumentError: bad argument (expected URI object or URI string)
# ./spec/requests/relationships_controller_spec.rb:36:in `block (3 levels) in <top (required)>'
在浏览器 AJAX 工作正常,但测试是红色的。:(
我对编程、Rails 和 Stackowerflow 还是很陌生。请帮我解决这个问题。:3