lib/matchers/document/have_index.rb in mongoid-minitest-0.0.3 vs lib/matchers/document/have_index.rb in mongoid-minitest-0.0.3.1
- old
+ new
@@ -8,10 +8,10 @@
end
def matches?(subject)
@klass = class_of(subject)
- if !@klass.index_options[@field.to_sym]
+ unless @klass.index_options[@field.to_sym] || @klass.index_options["#{@field}_id"]
@error = "no index for #{@field.inspect}"
return false
end