Created
September 11, 2013 13:31
-
-
Save akofink/6523653 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe Comment do | |
let(:recipe) { mock_model Recipe } | |
let(:user) { mock_model User } | |
let(:comment) { Comment.new } | |
it 'belongs to a recipe' do | |
Comment.should_receive :recipe_id | |
comment.recipe | |
end | |
it 'belongs to a user' do | |
Comment.should_recieve :user_id | |
comment.user | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@joeyjoejoejr I feel like this should work, but ActiveRecord never calls user_id or recipe_id, which is the actual name of the column which must be referenced to perform the association lookup.