Sha256: ebeecf099bf8c333982732525b583ef9bfc2afa31cf113ff6d83b714e27810db
Contents?: true
Size: 704 Bytes
Versions: 17
Compression:
Stored size: 704 Bytes
Contents
require 'spec_helper' describe CurationConcerns::Renderers::ExternalLinkAttributeRenderer do let(:field) { :name } let(:renderer) { described_class.new(field, ['http://example.com']) } describe "#attribute_to_html" do subject { Nokogiri::HTML(renderer.render) } let(:expected) { Nokogiri::HTML(tr_content) } let(:tr_content) { "<tr><th>Name</th>\n" \ "<td><ul class='tabular'>" \ "<li class=\"attribute name\">"\ "<a href=\"http://example.com\">"\ "<span class='glyphicon glyphicon-new-window'></span> "\ "http://example.com</a></li>\n" \ "</ul></td></tr>" } it { expect(subject).to be_equivalent_to(expected) } end end
Version data entries
17 entries across 17 versions & 1 rubygems