Skip to content
Browse files

Fixing issue #8.

Apparently some people run the tests on Linux. Imagine that. :)
  • Loading branch information...
1 parent 4ac5de0 commit 134cab8ffdbd337bf0b8bb67b5097222f6f15769 Austin Ziegler committed Mar 21, 2012
Showing with 21 additions and 18 deletions.
  1. +15 −11 History.rdoc
  2. +6 −7 test/test_mime_type.rb
View
26 History.rdoc
@@ -1,4 +1,8 @@
-== MIME::Types 1.18 / 2012-03-20
+== 1.?? / ????-??-??
+* Resolve issue #8 (https://github.com/halostatue/mime-types/issues/8).
+ Apparently some people run the tests on Linux. Imagine that. :)
+
+== 1.18 / 2012-03-20
* New MIME Types:
* Types reported in Issue #6 (https://github.com/halostatue/mime-types/issues/6):
* CoffeeScript (text/x-coffeescript; .coffee; 8bit).
@@ -13,11 +17,11 @@
* It was pointed out that Licence.txt was incorrectly named. Fixed by renaming to Licence.rdoc (from Issue/Pull Request #8, https://github.com/halostatue/mime-types/issues/8).
* It was pointed out that a plan to have the test output generated automatically never went through. Issue #10 (https://github.com/halostatue/mime-types/issues/10)
-== MIME::Types 1.17.2 / 2011-10-25
+== 1.17.2 / 2011-10-25
* Bug Fixes:
* Fixed an issue with Ruby 1.9 and file encoding.
-== MIME::Types 1.17.1 / 2011-10-23
+== 1.17.1 / 2011-10-23
* Minor Enhancements:
* Implemented modern 'hoe' semantics.
* Switched to minitest instead of test/unit.
@@ -34,7 +38,7 @@
* Made it much easier to update MIME types from this point forward.
* Updated MIME types from IANA.
-== MIME::Types 1.16
+== 1.16
* Made compatible with Ruby 1.8.6, 1.8.7, and 1.9.1.
* Switched to the 'hoe' gem system and added a lot of build-time tools.
* Updated the MIME types to the list based on the values in the Perl library
@@ -44,7 +48,7 @@
starting soon on MIME::Types 2.x with richer data querying mechanisms
and support for external data sources.
-== MIME::Types 1.15
+== 1.15
* Removed lib/mime/type.rb to form a single MIME::Types database source. It
is unlikely that one will ever need MIME::Type without MIME::Types.
* Re-synchronized the MIME type list with the sources, focusing primarily on
@@ -58,7 +62,7 @@
priority as of this release. The data format and information has changed.
* Removed MIME::Types.by_suffix and MIME::Types.by_mediatype.
-== MIME::Types 1.13.1
+== 1.13.1
* Fixed a problem with the installer running tests. This now works.
* Improved the implementation of MIME::Type.signature?
* Moved code around to use the class << self idiom instead of always
@@ -72,7 +76,7 @@
version number to be updated separately from the Perl version while keeping
the MIME Type list version in sync.
-== MIME::Types 1.13
+== 1.13
! WARNING: This version changes the API of MIME::Types !
! WARNING: This version is compatible with Ruby 1.8 and higher ONLY !
* Removed dependency on InstallPackage; offering 1.13 as either .tar.gz or
@@ -111,22 +115,22 @@
exchange between the two projects.
* Added additional unit tests from Mark Overmeer's 1.12 version.
-== MIME::Types 1.07
+== 1.07
* Changed version numbering to match Perl MIME::Types 1.07.
* Re-synchronized with Mark Overmeer's list in Perl PMIME::Types 1.07.
* [NN Poster] updated the attributes for the PGP types.
-== MIME::Types 1.005
+== 1.005
* Changed to Phil Thomson's InstallPackage.
* Added several types from Perl MIME::Types 1.005.
* Cleaned up data format; some data formats will show up with proper data now.
-== MIME::Types 1.004
+== 1.004
* Updated to match Perl MIME::Types 1.004, links credited to Dan Puro. Adds
new reference list to http://www.indiana.edu/cgi-bin-local/mimetypes
* Removed InvalidType and replaced with TypeError.
* Changed instances of #type to #class.
* Cleaned up how simplified versions are created.
-== MIME::Types 1.003
+== 1.003
* Initial release based on Perl MIME::Types 1.003.
View
13 test/test_mime_type.rb
@@ -2,11 +2,10 @@
require 'mime/types'
require 'minitest/autorun'
-#require 'test/unit' unless defined? $ZENTEST and $ZENTEST
class TestMIME_Type < MiniTest::Unit::TestCase
def yaml_mime_type_from_array
- MIME::Type.from_array('text/x-yaml', %w(yaml yml), '8bit', 'linux')
+ MIME::Type.from_array('text/x-yaml', %w(yaml yml), '8bit', 'd9d172f608')
end
def setup
@@ -22,7 +21,7 @@ def test_class_from_array
def test_class_from_hash
yaml = MIME::Type.from_hash('Content-Type' => 'text/x-yaml',
'Content-Transfer-Encoding' => '8bit',
- 'System' => 'linux',
+ 'System' => 'd9d172f608',
'Extensions' => %w(yaml yml))
assert_instance_of(MIME::Type, yaml)
assert_equal('text/yaml', yaml.simplified)
@@ -247,7 +246,7 @@ def test_sub_type
def test_system_equals
yaml = yaml_mime_type_from_array
- assert_equal(yaml.system, %r{linux})
+ assert_equal(yaml.system, %r{d9d172f608})
yaml.system = /win32/
assert_equal(yaml.system, %r{win32})
yaml.system = nil
@@ -264,7 +263,7 @@ def test_system_eh
def test_to_a
yaml = yaml_mime_type_from_array
assert_equal(yaml.to_a, ['text/x-yaml', %w(yaml yml), '8bit',
- /linux/, nil, nil, nil, false])
+ /d9d172f608/, nil, nil, nil, false])
end
def test_to_hash
@@ -273,7 +272,7 @@ def test_to_hash
{ 'Content-Type' => 'text/x-yaml',
'Content-Transfer-Encoding' => '8bit',
'Extensions' => %w(yaml yml),
- 'System' => /linux/,
+ 'System' => /d9d172f608/,
'Registered' => false,
'URL' => nil,
'Obsolete' => nil,
@@ -289,7 +288,7 @@ def test_class_constructors
yaml = MIME::Type.new('text/x-yaml') do |y|
y.extensions = %w(yaml yml)
y.encoding = '8bit'
- y.system = 'linux'
+ y.system = 'd9d172f608'
end
assert_instance_of(MIME::Type, yaml)
assert_raises(MIME::InvalidContentType) { MIME::Type.new('apps') }

0 comments on commit 134cab8

Please sign in to comment.
Something went wrong with that request. Please try again.