lib/matchers/document/have_index.rb in mongoid-minitest-0.1.3 vs lib/matchers/document/have_index.rb in mongoid-minitest-0.1.4
- old
+ new
@@ -7,10 +7,10 @@
def matches?(subject)
@klass = class_of(subject)
@klass.index_options.each do |key, options|
- unless key[@field.to_sym] || key["#{@field}_id"]
+ unless key[@field.to_sym] || key[:"#{@field}_id"]
@error = "no index for #{@field.inspect}"
return false
end
end