Sha256: f4827100d5295242e769db63335fdbaca39f35eebcccc987addc3b1e09d82952

Contents?: true

Size: 581 Bytes

Versions: 8

Compression:

Stored size: 581 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe "EeePub::ContainerItem" do
  
  context 'guess media type' do

    before :each do
      @container_item = EeePub::ContainerItem.new []
    end

    it 'should be application/xhtml+xml' do
      media_type = 'application/xhtml+xml'
      ['test.htm', 'test.html', 'test.xhtm', 'test.xhtml'].each do |file_name|
        @container_item.send(:guess_media_type, file_name).should == media_type
      end
      @container_item.send(:guess_media_type, "test.xml").should_not == media_type
    end
  end

end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
eeepub_ext-0.8.4 spec/eeepub/container_item_spec.rb
eeepub_ext-0.8.3 spec/eeepub/container_item_spec.rb
eeepub_ext-0.8.2 spec/eeepub/container_item_spec.rb
eeepub3-0.0.1 spec/eeepub/container_item_spec.rb
eeepub-with-cover-support-0.8.8 spec/eeepub/container_item_spec.rb
eeepub-0.8.1 spec/eeepub/container_item_spec.rb
eeepub-with-cover-support-0.8.7 spec/eeepub/container_item_spec.rb
eeepub-with-cover-support-0.8.6 spec/eeepub/container_item_spec.rb