我遇到了一个奇怪的无限递归,它只出现在 Rspec 测试中。奇怪的是,这是由于向我的用户对象添加了审核,即使它失败的规范实际上与我的用户对象无关
这是它失败的测试。像所有无限递归一样,我没有得到实际的 stracktrace,只有堆栈级别太深失败:
1) Spree::CheckoutController order in address state #update payment to complete step should set the address id on a newly created credit card; does not regress https://www.pivotaltracker.com/story/show/84864964
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
# /Users/jason/.rvm/gems/ruby-2.1.5/gems/activerecord-4.1.11/lib/active_record/connection_adapters/abstract/database_statements.rb:212