require 'spec_helper' describe Premailer::Rails::Hook do def run_hook(message) Premailer::Rails::Hook.delivering_email(message) end class Mail::Message def html_string (html_part || self).body.to_s end end let(:message) { Fixtures::Message.with_body(:html) } let(:processed_message) { run_hook(message) } it 'inlines the CSS' do expect { run_hook(message) }.to \ change { message.html_string.include?("