Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

mime-types 1.17.2 fails tests with ruby 1.8.7 #8

Closed
graaff opened this Issue December 18, 2011 · 5 comments

2 participants

Hans de Graaff Austin Ziegler
Hans de Graaff

When I try to run the tests with ruby 1.8.7 I get the following failure:

  1) Failure:
test_platform_eh(TestMIME_Type) [./test/test_mime_type.rb:182]:
Failed refutation, no message given

33 tests, 139 assertions, 1 failures, 0 errors, 0 skips
Austin Ziegler
Owner

I can't reproduce on the Mac with 1.8.7-p358.


/Users/AZiegler/.rbenv/versions/1.8.7-p358/bin/ruby -w -Ilib:bin:test:. -e 'require "rubygems"; gem "minitest"; require "minitest/autorun"; require "test/test_mime_type.rb"; require "test/test_mime_types.rb"' -- 
Run options: --seed 54862

# Running tests:

.................................

Finished tests in 0.007822s, 4218.8699 tests/s, 18026.0803 assertions/s.

33 tests, 141 assertions, 0 failures, 0 errors, 0 skips

This is what will be going out tonight as 1.18.

Austin Ziegler halostatue closed this March 20, 2012
Hans de Graaff

I have the same problem with the released 1.18 version. This is on Gentoo Linux using ruby 1.8.7 (2011-12-28 patchlevel 357) [x86_64-linux].

yaml = #

Please let me know if you need more info on this, I'd be happy to dig around a bit more if you tell me what you need.

Austin Ziegler halostatue reopened this March 21, 2012
Austin Ziegler
Owner

I think I see the problem.

Can you try changing line 9 of test/test_mime_type.rb to:

    MIME::Type.from_array('text/x-yaml', %w(yaml yml), '8bit', 'xunil')

You'll get two different failures, but you get those, I know how to fix it and will commit a patch later.

Austin Ziegler halostatue referenced this issue from a commit March 21, 2012
Fixing issue #8.
Apparently some people run the tests on Linux. Imagine that. :)
134cab8
Austin Ziegler halostatue closed this March 21, 2012
Hans de Graaff
  1) Failure:
test_to_a(TestMIME_Type) [./test/test_mime_type.rb:267]:
--- expected
+++ actual
@@ -1 +1 @@
-["text/x-yaml", ["yaml", "yml"], "8bit", /xunil/, nil, nil, nil, false]
+["text/x-yaml", ["yaml", "yml"], "8bit", /linux/, nil, nil, nil, false]


  2) Failure:
test_system_equals(TestMIME_Type) [./test/test_mime_type.rb:251]:
Expected: /xunil/
  Actual: /linux/

  3) Failure:
test_to_hash(TestMIME_Type) [./test/test_mime_type.rb:273]:
--- expected
+++ actual
@@ -1 +1 @@
-{"Extensions"=>["yaml", "yml"], "Content-Transfer-Encoding"=>"8bit", "Registered"=>false, "System"=>/xunil/, "Content-Type"=>"text/x-yaml", "URL"=>nil, "Docs"=>nil, "Obsolete"=>nil}
+{"Extensions"=>["yaml", "yml"], "Content-Transfer-Encoding"=>"8bit", "Registered"=>false, "System"=>/linux/, "Content-Type"=>"text/x-yaml", "URL"=>nil, "Docs"=>nil, "Obsolete"=>nil}
Hans de Graaff

Fix confirmed, I just tested with the new commit and tests now pass on ruby 1.8, ruby 1.9 and jruby. Thanks!

Jonathan Perkin jperkin referenced this issue from a commit in joyent/pkgsrc March 21, 2012
Update ruby-mime-types to 1.18.
== MIME::Types 1.18 / 2012-03-20
* New MIME Types:
  * Types reported in Issue #6
    (halostatue/mime-types#6):
    * CoffeeScript (text/x-coffeescript; .coffee; 8bit).
    * AIR
      (application/vnd.adobe.air-applicationinstaller-package+zip, .air;
      base64).
    * WOFF (application/font-woff; .woff; base64).
    * TrueType (application/x-font-truetype; .ttf; base64).
    * OpenType (application/x-font-opentype; .otf; base64).
  * WebM (audio/webm, video/webm; .webm). Issue #11
    (halostatue/mime-types#11).
* New extensions:
  * f4v/f4p (video/mp4, used by Adobe); f4a/fb4 (audio/mp4, used by Adobe).
* Bug Fixes:
  * It was pointed out that Licence.txt was incorrectly named. Fixed by
    renaming to Licence.rdoc (from Issue/Pull Request #8,
    halostatue/mime-types#8).
  * It was pointed out that a plan to have the test output generated
    automatically never went through. Issue #10
    (halostatue/mime-types#10)
caef141
Jonathan Perkin jperkin referenced this issue from a commit in joyent/pkgsrc September 09, 2012
Update ruby-mime-types to 1.19.
== 1.19 / 2012-06-20
* New MIME Types:
  * XCF Gnome Images (image/x-xcf, image/x-compressed-xcf;
    .xcf). https://github.com/halostatue/mime-types/issue/17
  * Types reported in halostatue/mime-types#12:
    * DV (video/x-dv; .dv)
    * IVF (video/x-ivf; .ivf)
    * Matroska (video/x-matroska; .mkv)
    * Motion JPEG (video/x-motion-jpeg; .mjpg)
    * RealMedia (official; application/vnd.rn-realmedia; .rm)
* New extensions:
  * dcm (application/dicom); https://github.com/halostatue/mime-types/issue/16.
  * Types reported in halostatue/mime-types#12:
    * 3g2, 3gpp2 (video/3gpp2)
    * mpeg (video/mpeg)
    * mxf (application/mxf)
    * ts (video/MP2T)
    * ogg (video/ogg)
* Fixed MIME Types:
  * Adobe AIR application installer packages was missing a
    hyphen. https://github.com/halostatue/mime-types/issue/13
  * Types reported in halostatue/mime-types#12:
    * audio/x-pn-realaudio extension is .ra, not .rm.
* Resolved halostatue/mime-types#8. Apparently some
  people run the tests on Linux. Imagine that.
5b840cb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.