Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Controller
- OpenMailer.send_simple_text("jdavis@vandegriftinc.com", "Registration Request", email_body).deliver!
- #Test
- mail = double("mail")
- OpenMailer.should_receive(:send_simple_text).with("jdavis@vandegriftinc.com", "Registration Request", email_body).and_return mail
- mail.should_receive(:deliver!)
- #Error
- 1) RegistrationsController send_email emails Vandegrift with the registration form data and the server's system_code
- Failure/Error: OpenMailer.should_receive(:send_simple_text).with("jdavis@vandegriftinc.com", "Registration Request", email_body).and_return mail
- (<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")
- expected: 1 time
- received: 0 times
- # ./spec/controllers/registrations_controller_spec.rb:30:in `block (3 levels) in <top (required)>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement