I have figure this out.
I wanted to share this in case someone is having the same problem.
I have taken a different route to test email body:
Here is how my example looks now:
it "should contain child's first name and last name in email body" do
for part in @email.parts
if part["Content-Type"].to_s =~ /^text\/html\W/
root = part.body
assert_match '<p>New Enrollment Form for
FakeFirstName FakeLastName</p>', root.to_s
end
end
end
Hope this will help someone.
Thanks!
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users