Guest User

Untitled

a guest
May 28th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. According to step #2 in the extra credit section of the README for lab4, we need to include
  2. ActiveModel::Serialization; but the file contact.rb above throws the following error when
  3. running rake test:extra
  4.  
  5. 1) Error:
  6. test_should_be_serializable_to_xml(ContactTest):
  7. NoMethodError: undefined method `to_xml' for #<Contact:0x103438a60>
  8. /test/extra/contact_test.rb:15:in `test_should_be_serializable_to_xml'
  9.  
  10. If I change line #3 to
  11.  
  12. include ActiveModel::Serializers::Xml
  13.  
  14. then all tests pass.
Add Comment
Please, Sign In to add comment