Yeah, if I'm reading this right,
https://github.com/thoughtbot/shoulda-matchers/blob/master/lib/shoulda/matchers/active_record/have_db_index_matcher.rb#L65
is the offending line.

I'd make this code more like


is_unique = matched_index.unique

is_unique = not is_unique unless @options[:unique]

unless is_unique
  @missing = "#{table_name} has an index named #{matched_index.name} " <<
             "of unique #{matched_index.unique}, not #{@options[:unique]}."
end


Of course, I just did that in vim, no tests, so I might have screwed it up...

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to