Guest User

Untitled

a guest
Aug 28th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. require File.dirname(__FILE__) + '/../spec_helper'
  2.  
  3. describe Post do
  4. it "should be valid" do
  5. Post.new.should be_valid
  6. end
  7.  
  8. it "should have author" do
  9. @user = User.create(username: "User", email:"user@example.com", password:"password", password_confirmation: "password")
  10. p = @user.posts.create
  11. p.author.should be_a_kind_of User
  12. end
  13. end
Add Comment
Please, Sign In to add comment