diff options
author | Evgeniy Dolzhenko <dolzenko@gmail.com> | 2011-09-25 13:03:01 +0100 |
---|---|---|
committer | Evgeniy Dolzhenko <dolzenko@gmail.com> | 2011-09-25 13:03:01 +0100 |
commit | 86cf3fb5faffa38a0337b4396926f53f8501e66f (patch) | |
tree | f0a74a65b66358d89a0b236c6e8f30bf658b5ecf /actionpack/test/dispatch | |
parent | 933ba0cf6e20a5fac72ece21e5b51fbe485b3d90 (diff) | |
download | rails-86cf3fb5faffa38a0337b4396926f53f8501e66f.tar.gz rails-86cf3fb5faffa38a0337b4396926f53f8501e66f.tar.bz2 rails-86cf3fb5faffa38a0337b4396926f53f8501e66f.zip |
Implement Mime::Type#respond_to? (consistently with #method_missing)
Diffstat (limited to 'actionpack/test/dispatch')
-rw-r--r-- | actionpack/test/dispatch/mime_type_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/mime_type_test.rb b/actionpack/test/dispatch/mime_type_test.rb index 851fb59d51..08fe2127b9 100644 --- a/actionpack/test/dispatch/mime_type_test.rb +++ b/actionpack/test/dispatch/mime_type_test.rb @@ -107,8 +107,10 @@ class MimeTypeTest < ActiveSupport::TestCase # Remove custom Mime::Type instances set in other tests, like Mime::GIF and Mime::IPHONE types.delete_if { |type| !Mime.const_defined?(type.to_s.upcase) } + types.each do |type| mime = Mime.const_get(type.to_s.upcase) + assert mime.respond_to?("#{type}?"), "#{mime.inspect} does not respond to #{type}?" assert mime.send("#{type}?"), "#{mime.inspect} is not #{type}?" invalid_types = types - [type] invalid_types.delete(:html) if Mime::Type.html_types.include?(type) |