Guest User

Untitled

a guest
Feb 21st, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. describe Post do
  2.  
  3. before(:each) do
  4. @user = create_default_user
  5. @valid_attributes = {
  6. :title => "Dude where is my car",
  7. :content => 'I think I found it but I am not quite sure.'
  8. }
  9. end
  10.  
  11. it 'should have validations' do
  12. post = Post.new
  13. post.should_not be_valid
  14. post.title = @valid_attributes[:title]
  15. post.content = @valid_attributes[:content]
  16. post.author = @user
  17. p post
  18. post.should be_valid
  19. end
  20.  
  21. end
Add Comment
Please, Sign In to add comment