Sha256: c6c93f70a72947a9b693bfed9b29986cca9ec075e953df6a18fb6d882ec91525
Contents?: true
Size: 853 Bytes
Versions: 6
Compression:
Stored size: 853 Bytes
Contents
require 'spec_helper' module BelongsToAssociation include MarkMapper::Plugins::Associations describe "BelongsToAssociation" do context "class_name" do it "should camelize the name" do BelongsToAssociation.new(:user).class_name.should == 'User' end it "should be changeable using class_name option" do association = BelongsToAssociation.new(:user, :class_name => 'Person') association.class_name.should == 'Person' end end context "embeddable?" do it "should be false even if class is embeddable" do base = BelongsToAssociation.new(:address) base.embeddable?.should be_falsey end it "should be false if class is not embeddable" do base = BelongsToAssociation.new(:project) base.embeddable?.should be_falsey end end end end
Version data entries
6 entries across 6 versions & 1 rubygems