title: rspec how query html body email with capybara
body: <p>Maybe it's newbie question but I'm stucked.
  I try to query html email with capybara with no luck.
  here is the spec</p>
  
  <pre><code># encoding: utf-8
  require "spec_helper"
  require "resque"
  require "resque_spec"
  
  describe 'MailerUtils in action'  do
    include MailerMacros
  
    let(:service_provider_email) { FactoryGirl.create(:service_provider_email) }
    let(:service_provider) { service_provider_email.service_provider }
    let(:service_provider_email_list) { service_provider_email.service_provider_email_list   }
  
    before :all do
      Resque.inline = true
    end
  
    describe 'send one marketing email and unsubscribe' do
      before :each do
        reset_email
        PromotionActions.perform :too_low_profile_score, service_provider.id
      end
  
      it "should have unsubscribe link" do
        last_email.body.should have_content("отписаться от рассылки")
      end
  
      it "should have correct city in link" do
        last_email.body.find(:xpath, "//a[@id=\"unsubscribe_link\"][@href=\"http://#{service_provider.city.name}.#{service_provider.country.domain}/#{service_provider.code}?uncheck=marketing]")
        end
      end
    end
  </code></pre>
  
  <p>last example fail. how can I query html from email?</p>