如何使用轮胎宝石检查rspec
测试:ElasticSearch 索引中是否存在文档?
例子:
#model
class Car
include Mongoid::Document
include include Tire::Model::Search
include Tire::Model::Callbacks
#...
end
#spec
record = Car.first
record.tire.exist_in_index?.should be_true #wrong code
或者可能有任何其他解决方法。