I have 开发者_JAVA百科two models: User and Topic. Users can have many topics and topics belong to one user.
I have a Family class so defined: class Family < ActiveRecord::Base after_initialize :initialize_family
I\'ve got a problem with Spork test server. If I set config.cache_classes = false in config/environments/test.rb then specs start to rasie errors.
Maybe this isn\'t something that needs to be tested against, but I\'m learning so I don\'t think its wrong to test to the max.
I am creating an object with several has_many associations. Everything with regards tob building the object works fine, but when I try to test the deletion of one of the children or parent, it does no
I have 2 models, one which accepts attributes for the other and I\'m trying to find a clever way to use Factory girl to setup the data for both.
I am using factory girl for test data. I create a user object in a before(:each) block, and it runs through a few expectations just fine. If i run the tests again, the validation on the model fail bec
I have 2 models, User and Bucket. User has_many Buckets and a Bucket belongs_to a User. In factories.rb, I have:
so i had the following associations... Product embeds_many :pressings, :class_name => \"ProductPressing\"
How do I create multiple records or multiple factories of the same class? I tried: Factory.define :user do |user|