Commit 8c3953c4 by Daniel Mendler

drop 1.8.7

parent 52c286c6
language: ruby language: ruby
rvm: rvm:
- 1.8.7
- 1.9.3 - 1.9.3
- 2.0.0 - 2.0.0
- 2.1.0 - 2.1.0
- ruby-head - ruby-head
- jruby-18mode
- jruby-19mode - jruby-19mode
- rbx - rbx
matrix: matrix:
......
...@@ -67,9 +67,9 @@ describe 'MimeMagic' do ...@@ -67,9 +67,9 @@ describe 'MimeMagic' do
it 'should have add' do it 'should have add' do
MimeMagic.add('application/mimemagic-test', MimeMagic.add('application/mimemagic-test',
:extensions => %w(ext1 ext2), extensions: %w(ext1 ext2),
:parents => 'application/xml', parents: 'application/xml',
:comment => 'Comment') comment: 'Comment')
MimeMagic.by_extension('ext1').should.equal 'application/mimemagic-test' MimeMagic.by_extension('ext1').should.equal 'application/mimemagic-test'
MimeMagic.by_extension('ext2').should.equal 'application/mimemagic-test' MimeMagic.by_extension('ext2').should.equal 'application/mimemagic-test'
MimeMagic.by_extension('ext2').comment.should.equal 'Comment' MimeMagic.by_extension('ext2').comment.should.equal 'Comment'
...@@ -79,7 +79,7 @@ describe 'MimeMagic' do ...@@ -79,7 +79,7 @@ describe 'MimeMagic' do
it 'should process magic' do it 'should process magic' do
MimeMagic.add('application/mimemagic-test', MimeMagic.add('application/mimemagic-test',
:magic => [[0, 'MAGICTEST'], # MAGICTEST at position 0 magic: [[0, 'MAGICTEST'], # MAGICTEST at position 0
[1, 'MAGICTEST'], # MAGICTEST at position 1 [1, 'MAGICTEST'], # MAGICTEST at position 1
[9..12, 'MAGICTEST'], # MAGICTEST starting at position 9 to 12 [9..12, 'MAGICTEST'], # MAGICTEST starting at position 9 to 12
[2, 'MAGICTEST', [[0, 'X'], [0, 'Y']]]]) # MAGICTEST at position 2 and (X at 0 or Y at 0) [2, 'MAGICTEST', [[0, 'X'], [0, 'Y']]]]) # MAGICTEST at position 2 and (X at 0 or Y at 0)
...@@ -108,7 +108,7 @@ describe 'MimeMagic' do ...@@ -108,7 +108,7 @@ describe 'MimeMagic' do
end end
it 'should handle different file objects' do it 'should handle different file objects' do
MimeMagic.add('application/mimemagic-test', :magic => [[0, 'MAGICTEST']]) MimeMagic.add('application/mimemagic-test', magic: [[0, 'MAGICTEST']])
class ReadableObj class ReadableObj
def read def read
'MAGICTEST' 'MAGICTEST'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment