1 describe "Signup Email" do
2 include EmailSpec::Helpers
3 include EmailSpec::Matchers
4
5 before do
6 @email = UserMailer.create_signup("
[email protected]", "Jojo Binks")
7 end
8
9 it "should be set to be delivered to the email passed in" do
10 expect(@email).to deliver_to("
[email protected]")
11 end
12
13 it "should contain the user's message in the mail body" do
14 expect(@email).to have_body_text(/Jojo Binks/)
15 end
16 end