Sha256: 20735bf0ed5decc8cfe05ad23780c6af1864b5b46a33c3a9621df0b65fc5f587
Contents?: true
Size: 524 Bytes
Versions: 8
Compression:
Stored size: 524 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
8 entries across 8 versions & 1 rubygems