Sha256: f534dddf3ab9d509763dcf137af12610f166d0c5531446f1e97c9478dcf4f68f

Contents?: true

Size: 740 Bytes

Versions: 10

Compression:

Stored size: 740 Bytes

Contents

require'spec_helper'

describe 'renderer and mime types' do

  it "is registered" do
    ActionController::Renderers::RENDERERS.include?(:xlsx)
    ActionController::Renderers::RENDERERS.include?(:xls)
    ActionController::Renderers::RENDERERS.include?(:csv)
  end

  it "xlsx mime type" do
    Mime::XLSX.should be
    Mime::XLSX.to_sym.should == :xlsx
    Mime::XLSX.to_s.should == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
  end

  it "xls mime type" do
    Mime::XLS.should be
    Mime::XLS.to_sym.should == :xls
    Mime::XLS.to_s.should == "application/vnd.ms-excel"
  end

  it "csv mime type" do
    Mime::CSV.should be
    Mime::CSV.to_sym.should == :csv
    Mime::CSV.to_s.should == "text/csv"
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
cloudxls-rails-0.6.2 spec/mime_types_spec.rb
cloudxls-rails-0.6.1 spec/mime_types_spec.rb
cloudxls-rails-0.6.0 spec/mime_types_spec.rb
cloudxls-rails-0.5.0 spec/mime_types_spec.rb
cloudxls-rails-0.4.3 spec/mime_types_spec.rb
cloudxls-rails-0.4.2 spec/mime_types_spec.rb
cloudxls-rails-0.4.1 spec/mime_types_spec.rb
cloudxls-rails-0.4.0 spec/mime_types_spec.rb
cloudxls-rails-0.3.1 spec/mime_types_spec.rb
cloudxls-rails-0.3.0 spec/mime_types_spec.rb