Skip to content
Newer
Older
100644 20 lines (15 sloc) 501 Bytes
94c9e49 cleanup up impl
jcarroll authored
1 require File.join(File.dirname(__FILE__), 'test_helper')
deef9bb created the what plugin
dcroak authored
2
2bde681 moved query methods to Mime::Type
jcarroll authored
3 class WhatTest < Test::Unit::TestCase
a236f07 a few updates, trying to automatically add a few more mime-types
dcroak authored
4
deef9bb created the what plugin
dcroak authored
5 def setup
2bde681 moved query methods to Mime::Type
jcarroll authored
6 Mime::Type.register 'image/gif', :gif
7 Mime::Type.register 'text/iphone', :iphone
8 Mime::Type.register 'text/x-mobile', :mobile
9 Mime::Type.register 'application/pdf', :pdf
10 Mime::Type.register 'image/png', :png
deef9bb created the what plugin
dcroak authored
11 end
7a2dc21 got commented out test to pass
jcarroll authored
12
2bde681 moved query methods to Mime::Type
jcarroll authored
13 Mime::SET.each do |type|
14 define_method "test_new_#{type.to_sym}?_convenience_method" do
15 assert type.send("#{type.to_sym}?")
7a2dc21 got commented out test to pass
jcarroll authored
16 end
17 end
18
deef9bb created the what plugin
dcroak authored
19 end
Something went wrong with that request. Please try again.