Sha256: 9b938f01f545e475ad33f090036832e1b52f5d3ddad7711c63567dfd83b179da

Contents?: true

Size: 712 Bytes

Versions: 10

Compression:

Stored size: 712 Bytes

Contents

require 'spec_helper'

module BerkeleyLibrary
  module Util
    module ODS
      module XML
        module Manifest
          describe FileEntry do
            let(:doc) { Nokogiri::XML::Document.new }
            let(:manifest) { Manifest.new(doc: doc) }

            describe :new do
              it 'guesses the media type' do
                entry = FileEntry.new('foo.xml', manifest: manifest)
                expect(entry.media_type).to eq('text/xml')
              end

              it 'rejects unknown types' do
                expect { FileEntry.new('foo.bar', manifest: manifest) }.to raise_error(ArgumentError)
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
berkeley_library-tind-0.7.2 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.7.1 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.7.0 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.6.0 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.5.1 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.5.0 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.4.3 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.4.2 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.4.1 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb
berkeley_library-tind-0.4.0 spec/berkeley_library/util/ods/xml/manifest/file_entry_spec.rb