Sha256: dfa13da611476b124a1c57e42e7455f5738dd97595a75c15bfdc07e8379e59c9
Contents?: true
Size: 763 Bytes
Versions: 6
Compression:
Stored size: 763 Bytes
Contents
# frozen_string_literal: true shared_examples_for "url rewriter" do it "is constructed with a generator" do generator = double "URL generator" expect { described_class.new(generator) }.to_not raise_error end it "has a #transform_dom(dom) method that returns the modified string" do expect(subject).to respond_to(:transform_dom) expect(subject.method(:transform_dom).arity).to eq(1) dom = Nokogiri::HTML.parse "<body></body>" expect(subject.transform_dom(dom)).to be_nil end it "has a #transform_css(css) method that returns the modified string" do expect(subject).to respond_to(:transform_css) expect(subject.method(:transform_css).arity).to eq(1) expect(subject.transform_css("")).to eq("") end end
Version data entries
6 entries across 6 versions & 1 rubygems