Guest User

Untitled

a guest
Apr 22nd, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. require File.dirname(__FILE__) + '/../test_helper'
  2.  
  3. class MemberTest < ActiveSupport::TestCase
  4.  
  5. fixtures :members
  6.  
  7. def test_have_data_from_fixture
  8. assert_equal(2, Member.count)
  9. one = members(:one)
  10. # this prints out
  11. # #<Member id: 1, username: "frida", hashed_password: "notyetahashedpassword", created_at: "2008-04-04 14:52:20", updated_at: "2008-04-04 14:52:20">
  12. puts one.inspect
  13. # but this fails because one.username is nil. Huh???
  14. assert_equal "frida", one.username
  15. end
  16. end
Add Comment
Please, Sign In to add comment