Sha256: 7280744e03e2e504e1cbc21f185285b8b011a18cb3bdfd7172dc3ab0c573400b
Contents?: true
Size: 558 Bytes
Versions: 20
Compression:
Stored size: 558 Bytes
Contents
require 'spec_helper' module Ddr::Models::Structures RSpec.describe FileSec, type: :model, structure: true do let(:attrs) { { id: 'abc' } } let(:doc) { Ddr::Models::Structure.xml_template } let(:node) do node = Nokogiri::XML::Node.new('fileSec', doc) node['ID'] = attrs[:id] doc.root.add_child(node) node end describe ".build" do it "should build the correct node" do expect(described_class.build(attrs.merge(document: doc)).to_xml).to be_equivalent_to(node.to_xml) end end end end
Version data entries
20 entries across 20 versions & 1 rubygems