public
Rubygem
Fork of thoughtbot/shoulda
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/technicalpickles/shoulda.git
Fixed should_have_indices to always use the correct table name [#89] 
[Jacob Harris]

 * Fixes the case where `set_table_name` is used to override a table name 
 for abnormal naming schemes
rmm5t (author)
Fri Sep 26 07:05:07 -0700 2008
commit  37ca292bf1673ff71a37b625d51306ec2ee9b119
tree    43e043d8934c38d19754b2555b1bcbec21d732c7
parent  c84e84ded644ef7c6e16e0e41938a5b144c71e64
...
603
604
605
606
 
607
608
609
...
603
604
605
 
606
607
608
609
0
@@ -603,7 +603,7 @@ module ThoughtBot # :nodoc:
0
         # should_have_index :age
0
         #
0
         def should_have_indices(*columns)
0
- table = model_class.name.tableize
0
+ table = model_class.table_name
0
           indices = ::ActiveRecord::Base.connection.indexes(table).map(&:columns)
0
 
0
           columns.each do |column|

Comments

    No one has commented yet.