How do i get the full text content of an html email as single line string in rspec?

Let's say this is the mail.html.haml:

```
%p 
  This product is worth: 
  = @amount
  So buy it now!

```

In rspec i send the email first and then do this:

```
expect(ActionMailer::Base.deliveries.last.html_part.body).to include("This product is worth: €30 So buy it now")

```

or:

```
expect(ActionMailer::Base.deliveries.last.html_part.body.raw_source).to include("This product is worth: €30 So buy it now")

```

or:

```
expect(ActionMailer::Base.deliveries.last.html_part.body.raw_source).to have_content("This product is worth: €30 So buy it now")

```

These doesnt work because the html outputs to rspec like this:

```
 + This product is worth:
 + €30
 + So buy it now!

```

So my original code is right but i cant seem to grab it in rspec. How do i combine these 3 lines to 1 single line so i can call include or have\_content on it correctly?

**\*EDIT**

```
Failure/Error:
       expect(ActionMailer::Base.deliveries.last.html_part.body.raw_source).to have_content(%q|This product is worth:
                                                                                               €30
                                                                                               So buy it now!|)

       expected        
       <p>
       This product is worth:
       €30
       So buy it now!
       Good luck!
       </p>

```