Skip to content

Instantly share code, notes, and snippets.

@bleonard
Created December 24, 2016 18:21
Show Gist options
  • Save bleonard/0e690498e06dc91147a956ac11261453 to your computer and use it in GitHub Desktop.
Save bleonard/0e690498e06dc91147a956ac11261453 to your computer and use it in GitHub Desktop.
describe Content::Post do
fixtures :users
it "should be associated with a user" do
user = users(:willy)
post = Content::Post.new(content: "words")
post.user = user
post.save.should == true
user.posts.count.should == 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment