我使用内存数据库进行测试。模式在每次测试中都会重新加载。 最近我的rspec抱怨没有找到表。原因是范围在加载时引用另一个模型。 class Item
scope :public, where(:store_id => Store.public_store_ids())
class Store
def self.public_store_ids
self.publi
我想通过rspec将BDD集成到我的rails应用程序中。我正在使用警卫和spork-rails来加速监控过程。我得到这个错误: An error occurred in an after hook
ActiveRecord::StatementInvalid: ArgumentError: prepare called on a closed database:
rollback trans