Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- describe Post do
- before(:each) do
- @user = create_default_user
- @valid_attributes = {
- :title => "Dude where is my car",
- :content => 'I think I found it but I am not quite sure.'
- }
- end
- it 'should have validations' do
- post = Post.new
- post.should_not be_valid
- post.title = @valid_attributes[:title]
- post.content = @valid_attributes[:content]
- post.author = @user
- p post
- post.should be_valid
- end
- end
Add Comment
Please, Sign In to add comment