Sha256: 004c73c8b6911fa0ba7ab29a361c3290a7b7986c5237766e1c1a130dc1ea46c2

Contents?: true

Size: 560 Bytes

Versions: 7

Compression:

Stored size: 560 Bytes

Contents

require 'test_helper'
require 'models'

class NamespaceTest < Test::Unit::TestCase
  include Hollywood

  context "Hollywood namespace" do
    setup do
      @movie = Movie.create
      @actor = Actor.create
      @role = Role.create(
        :movie_id => @movie.id,
        :actor_id => @actor.id
      )
    end

    should "belongs_to associations" do
      @role.actor.should == @actor
      @role.movie.should == @movie
    end

    should "many associations" do
      @movie.roles.should == [@role]
      @actor.roles.should == [@role]
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
djsun-mongo_mapper-0.5.6.6 test/functional/associations/test_namespace.rb
djsun-mongo_mapper-0.5.6.5 test/functional/associations/test_namespace.rb
djsun-mongo_mapper-0.5.6.4 test/functional/associations/test_namespace.rb
djsun-mongo_mapper-0.5.6.3 test/functional/associations/test_namespace.rb
djsun-mongo_mapper-0.5.6.2 test/functional/associations/test_namespace.rb
djsun-mongo_mapper-0.5.6.1 test/functional/associations/test_namespace.rb
djsun-mongo_mapper-0.5.5.3 test/functional/associations/test_namespace.rb