Sha256: 20477b12eb180cae2eeb23098a608d6f0ca427de2cc29d1894cd1e1ed7dc9fc9
Contents?: true
Size: 527 Bytes
Versions: 3
Compression:
Stored size: 527 Bytes
Contents
require 'spec_helper' describe Id::Model::Association do module Foo module Bar module Baz class Quux end end end end let (:model) { stub(:name => "Foo::Bar::Baz::Quux") } let (:has_one) { Id::Model::Association.new(model, "yak", {}) } describe "hierarchy" do it "builds the class and module hierarchy for the model" do has_one.hierarchy.constants.should eq [ Foo::Bar::Baz::Quux, Foo::Bar::Baz, Foo::Bar, Foo ] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
id-0.0.12 | spec/lib/id/model/association_spec.rb |
id-0.0.11 | spec/lib/id/model/association_spec.rb |
id-0.0.10 | spec/lib/id/model/association_spec.rb |