I'm using the following webrat matcher:
response.should contain(text)
With the following haml:
%p
You have
= current_user.credits
credits
I've written the cucumber step 'Then I should see "You have 10 credits"', which uses the webrat matcher above. The step fails, webrat does not find the text in the response because the haml actually produces
<p>You have
10
credits</p>
How can I get the matcher to match the output that haml produces?
Note: the above is a simplified example to the situation i'm dealing with. Writing the following haml is not an acceptable solution:
%p= "You have #{current_user.credits} credits"