Guest User

Untitled

a guest
Sep 2nd, 2018
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. # spec/fixtures/user.yml
  2. burhanudin:
  3. first_name: Burhanudin
  4. last_name: Hakim
  5. email: burhanudin@me.com
  6. password: secret
  7. role: admin
  8. title: developer
  9. location: yogyakarta
  10. galih:
  11. first_name: Galih
  12. last_name: Pranowo
  13. email: galih@me.com
  14. password: secret
  15. role: member
  16. title: unicorn
  17. location: temanggung
  18.  
  19. # spec/model/user_spec.rb
  20. RSpec.describe User do
  21. describe "#full_name" do
  22. it "Concatenate firstname and lastname" do
  23. user = user(:burhanudin)
  24.  
  25. expect(user.full_name).to eq("Burhanudin Hakim")
  26. end
  27. end
  28. end
Add Comment
Please, Sign In to add comment