# Testing a custom mime type

**URL:** <https://www.ruby-forum.com/t/testing-a-custom-mime-type/172361>\
**Category:** Rails\
**Created:** [July 20, 2009, 8:19am UTC](https://www.ruby-forum.com/t/testing-a-custom-mime-type/172361 "2009-07-20T08:19:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@alex](https://www.ruby-forum.com/u/alex)\
**Post date:** [July 20, 2009, 8:19am UTC](https://www.ruby-forum.com/t/testing-a-custom-mime-type/172361/1 "2009-07-20T08:19:26Z")

</div>

I’ve registered my mime type and set up a custom parser:

Mime::Type.register “application/plist+xml”, :plist  
ActionController::Base.param\_parsers[Mime::Type.lookup\_by\_extension  
(“plist”)] = Proc.new { |data| Plist::parse\_xml(data) }

Now how do I test this?

When I do this:

```
  @request.env['RAW_POST_DATA'] = {:foo => bar}.to_plist
  post :create, :format => 'plist'

```

My custom parser is not called.
