# frozen_string_literal: true require "rails_helper" describe PrettyText do it "should remove spoilers from excerpts" do expect( PrettyText.excerpt("
", 100), ).to match_html "" expect(PrettyText.excerpt("spoiler", 100)).to match_html "" expect( PrettyText.excerpt("Inline text spoiler after spoiler", 100), ).to match_html "Inline text after spoiler" end end