我的后端有一组测试(用于轨道上的红宝石)。这些测试在某些时间都是绿色的,但是2天前我开始运行它们(我在网站上工作了1个月),其中一些是红色的
错误很奇怪
测试
post "/login", {:format => :json, :email => email, :password => password}
assert_response status, response.body
错误是
ActionController::UnknownHttpMethod: POST, accepted HTTP methods are OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK, UNLOCK, VERSION-CONTROL, REPORT, CHECKOUT, CHECKIN, UNCHECKOUT, MKWORKSPACE, UPDATE, LABEL, MERGE, BASELINE-CONTROL, MKACTIVITY, ORDERPATCH, ACL, SEARCH, and PATCH
test/integration/helpers/basic_helpers.rb:7:in `login'
test/integration/integration_users_test.rb:11:in `block in <class:IntegrationUser>'
错误很奇怪有两个原因:
您认为会导致这样的错误?
答案 0 :(得分:0)
我找到了答案。我修改了ruby String类。
class String
def upcase
self.mb_chars.upcase
end
end
这是一个非常愚蠢的决定,因为它打破了功能=(