Sha256: 4c6bf3e952523b752fc52e569baebddd3b6cddc1030c2b1ead9fd93899c3e6f4
Contents?: true
Size: 537 Bytes
Versions: 1
Compression:
Stored size: 537 Bytes
Contents
require 'spec_helper' describe CuisineType do it "finds self and parents properly" do e = CuisineType.new(:name => "e") m = CuisineType.new(:name => "m") e.children << m e.save m.parent.should == e m.self_and_ancestors.should == [m, e] # make sure reloading doesn't affect the self_and_ancestors: m.reload m.self_and_ancestors.should == [m, e] end it "sets the table_name of the hierarchy class properly" do CuisineTypeHierarchy.table_name.should == "cuisine_type_hierarchies" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
closure_tree-3.3.2 | spec/cuisine_type_spec.rb |