Sha256: c43aac41de5cf18c80737684427c7fac83ef5a946831a570089d39723c43b797

Contents?: true

Size: 788 Bytes

Versions: 8

Compression:

Stored size: 788 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'spec_helper'))

describe DataMapper::Associations::ManyToMany do

  load_models_for_metaphor :vehicles, :content

  it 'should allow a declaration' do
    lambda do
      class Supplier
        has n, :manufacturers, :through => Resource
      end
    end.should_not raise_error
  end

  it 'should handle models inside modules' do
    lambda do
      module Content
        class Dialect
          has n, :locales, :through => Resource, :class_name => "Language::Locale"
        end

        class Locale
          has n, :dialects, :through => Resource, :class_name => "Language::Dialect"
        end
      end
    end.should_not raise_error
  end

end

describe DataMapper::Associations::ManyToMany::Proxy do
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
sam-dm-core-0.9.10 spec/unit/associations/many_to_many_spec.rb
sam-dm-core-0.9.7 spec/unit/associations/many_to_many_spec.rb
sam-dm-core-0.9.8 spec/unit/associations/many_to_many_spec.rb
sam-dm-core-0.9.9 spec/unit/associations/many_to_many_spec.rb
dm-core-0.9.7 spec/unit/associations/many_to_many_spec.rb
dm-core-0.9.6 spec/unit/associations/many_to_many_spec.rb
dm-core-0.9.8 spec/unit/associations/many_to_many_spec.rb
dm-core-0.9.9 spec/unit/associations/many_to_many_spec.rb