Sha256: bd6ff89a92a792b15c2a88a57ec282e573527ab82bd83c5940691c9df5d80157
Contents?: true
Size: 513 Bytes
Versions: 16
Compression:
Stored size: 513 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' describe DocTemplate::Tags::TaskTag do let(:node) { Nokogiri::HTML(original_content).at_xpath('*//p') } let(:original_content) { "<p><span>[task: #{task_number}]</span></p><p><span>" } let(:tag) { described_class.new } let(:task_number) { 2 } subject { tag.parse(node, value: task_number).content } it 'substitutes the tag' do expect(subject).to_not include '[task: ' expect(subject).to include "<h4>Task #{task_number}</h4>" end end
Version data entries
16 entries across 16 versions & 1 rubygems