Sha256: bcec99ed3e7d2eee47c664c44047c666ad29528cc7fb848f05c857f8d584fbb2

Contents?: true

Size: 602 Bytes

Versions: 20

Compression:

Stored size: 602 Bytes

Contents

require 'spec_helper'

module Ddr::Models::Structures
  RSpec.describe FileGrp, type: :model, structure: true do

    let(:attrs) { { id: 'abc', use: 'efg' } }
    let(:doc) { Ddr::Models::Structure.xml_template }
    let(:node) do
      node = Nokogiri::XML::Node.new('fileGrp', doc)
      node['ID'] = attrs[:id]
      node['USE'] = attrs[:use]
      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

Version Path
ddr-models-2.11.0 spec/models/structures/file_grp_spec.rb
ddr-models-2.10.2 spec/models/structures/file_grp_spec.rb
ddr-models-2.10.1 spec/models/structures/file_grp_spec.rb
ddr-models-2.10.0 spec/models/structures/file_grp_spec.rb
ddr-models-2.10.0.rc2 spec/models/structures/file_grp_spec.rb
ddr-models-2.10.0.rc1 spec/models/structures/file_grp_spec.rb
ddr-models-2.9.2 spec/models/structures/file_grp_spec.rb
ddr-models-2.9.1 spec/models/structures/file_grp_spec.rb
ddr-models-2.9.0 spec/models/structures/file_grp_spec.rb
ddr-models-2.9.0.rc1 spec/models/structures/file_grp_spec.rb
ddr-models-2.8.0 spec/models/structures/file_grp_spec.rb
ddr-models-2.8.0.rc1 spec/models/structures/file_grp_spec.rb
ddr-models-2.7.6 spec/models/structures/file_grp_spec.rb
ddr-models-2.7.5 spec/models/structures/file_grp_spec.rb
ddr-models-2.7.4 spec/models/structures/file_grp_spec.rb
ddr-models-2.7.3 spec/models/structures/file_grp_spec.rb
ddr-models-2.7.2 spec/models/structures/file_grp_spec.rb
ddr-models-2.7.1 spec/models/structures/file_grp_spec.rb
ddr-models-2.7.0 spec/models/structures/file_grp_spec.rb
ddr-models-2.7.0.rc1 spec/models/structures/file_grp_spec.rb