It's not the prettiest solution, but i was able to get this done by
extracting the html body from the email into a new response object.
response = ActionController::Response.new
response.body=current_email.body_html
response.extend(ActionController::TestResponseBehavior)
...
response.should have_selector("#order-email-
count", :content=>order_count.to_s) unless order_count==0
response.should_not have_selector("#order-email-count") if
order_count==0
thx.
-karl
On Aug 13, 2009, at 7:23 PM, aslak hellesoy wrote:
>
>