spec/unit/table_spec.rb in lhm-1.0.0.rc.1 vs spec/unit/table_spec.rb in lhm-1.0.0.rc2

- old
+ new

@@ -23,12 +23,24 @@ @table. idx_name(["name"]). must_equal("index_users_on_name") end - it "should name index with a multiple columns" do + it "should name index with multiple columns" do @table. idx_name(["name", "firstname"]). + must_equal("index_users_on_name_and_firstname") + end + + it "should name index with prefixed column" do + @table. + idx_name(["name(10)", "firstname"]). + must_equal("index_users_on_name_and_firstname") + end + + it "should name index with column names given as symbol" do + @table. + idx_name([:name, :firstname]). must_equal("index_users_on_name_and_firstname") end end describe "constraints" do