Guest User

Untitled

a guest
Jun 24th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. before(:each) do
  2. @valid_attributes = {
  3. :subject => "Test Subject",
  4. :body => "Body",
  5. :sender => User.make,
  6. :recipient => User.make
  7. }
  8. end
  9.  
  10. it "should require a subject" do
  11. #message = Message.create(@valid_attributes.delete(:subject)) #gives me errors on saying no method found: stringify keys
  12. message = Message.create(@valid_attributes[:subject] = nil) #works
  13. message == nil
  14. end
Add Comment
Please, Sign In to add comment