Testing a custom mime type

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

Mime::Type.register “application/plist+xml”, :plist
(“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.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs