Advertisement
Guest User

Untitled

a guest
Sep 18th, 2015
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. #Controller
  2.  
  3. OpenMailer.send_simple_text("jdavis@vandegriftinc.com", "Registration Request", email_body).deliver!
  4.  
  5. #Test
  6.  
  7. mail = double("mail")
  8. OpenMailer.should_receive(:send_simple_text).with("jdavis@vandegriftinc.com", "Registration Request", email_body).and_return mail
  9. mail.should_receive(:deliver!)
  10.  
  11. #Error
  12.  
  13. 1) RegistrationsController send_email emails Vandegrift with the registration form data and the server's system_code
  14. Failure/Error: OpenMailer.should_receive(:send_simple_text).with("jdavis@vandegriftinc.com", "Registration Request", email_body).and_return mail
  15. (<OpenMailer (class)>).send_simple_text("jdavis@vandegriftinc.com", "Registration Request", "\nREGISTRATION REQUEST\n\nEmail: john_doe@acme.com\nFirst Name: John\nLast Name: Doe\nCompany: Acme\nCustomer Number: 123456789\nContact: Jane Smith\nSystem Code: HAL9000\n")
  16. expected: 1 time
  17. received: 0 times
  18. # ./spec/controllers/registrations_controller_spec.rb:30:in `block (3 levels) in <top (required)>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement