Sha256: d0c20eddb71a07c1aaed8ac37faa06326a05765cc1570b98ca5b08b4a6604c18
Contents?: true
Size: 768 Bytes
Versions: 15
Compression:
Stored size: 768 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', 'spec_helper') describe DelegateBelongsTo, 'with a mix of the default delegations and a specified delegation' do before :all do @fields = Contact.column_names - UserMixed.default_rejected_delegate_columns + [:fullname] UserMixed.delegate_belongs_to :contact, :defaults, :fullname end before :each do @user = UserMixed.new end it 'should declare the association' do UserMixed.reflect_on_association(:contact).should_not be_nil end it 'creates reader methods for columns' do @fields.each do |col| @user.should respond_to(col) end end it 'creates writer methods for columns' do @fields.each do |col| @user.should respond_to("#{col}=") end end end
Version data entries
15 entries across 15 versions & 2 rubygems