require 'spec_helper' require 'email' describe EmailStyles do def style_exists(html, css_rule) fragment = Nokogiri::HTML.fragment(EmailStyles.new(html).format) element = fragment.at(css_rule) expect(element["style"]).not_to be_blank end it "returns blank from an empty string" do EmailStyles.new("").format.should be_blank end it "attaches a style to h3 tags" do style_exists("
hello").format).to eq("hello") end end