Sha256: 384645f61aad7b49b0ad08d6a52efa840e9d900bddb3d9c69bcb60b3e274dee0
Contents?: true
Size: 584 Bytes
Versions: 3
Compression:
Stored size: 584 Bytes
Contents
require 'test_helper' require 'rack' class Marcel::MimeType::MagicTest < Marcel::TestCase # These fixtures should be recognisable given only their contents. Where a generic type # has more specific subclasses (such as application/zip), these subclasses cannot usually # be recognised by magic alone; their name is also needed to correctly identify them. each_content_type_fixture('magic') do |file, name, content_type| test "gets type for #{content_type} by using only magic bytes #{name}" do assert_equal content_type, Marcel::MimeType.for(file) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
marcel-0.3.2 | test/magic_test.rb |
marcel-0.3.1 | test/magic_test.rb |
marcel-0.3.0 | test/magic_test.rb |