Sha256: 552be195596334275d0e3a5e8fa9d835572fc5a18e712d3270a0e1870a0affae
Contents?: true
Size: 654 Bytes
Versions: 3
Compression:
Stored size: 654 Bytes
Contents
require 'test_helper' describe Rack::PageCaching::MimeTypes do let(:mime_types) { Rack::PageCaching::MimeTypes } describe '.extension_for' do { 'text/html' => '.html', 'application/json' => '.json', 'text/css' => '.css' }.each do |content_type, extension| it "returns #{extension} for content type #{content_type}" do mime_types.extension_for(content_type).must_equal extension end end end describe '.register' do it 'allows registration of custom content_type' do mime_types.register 'text/ing', '.ing' mime_types.extension_for('text/ing').must_equal '.ing' end end end
Version data entries
3 entries across 3 versions & 1 rubygems