Sha256: 1651d7baa7537762d680b151503500e38ba92047d071da5ea98c843fdfcb5e51
Contents?: true
Size: 665 Bytes
Versions: 2
Compression:
Stored size: 665 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe "Uploading" do with_mongo_model with_file_model before :all do class TheFile < Models::BaseFile end class ThePost inherit Mongo::Model, Mongo::Model::FileModel mount_file :file, TheFile end end after(:all){remove_constants :ThePost, :TheFile} it "should preserve spaces and unicode characters in filename" do File.open "#{spec_dir}/файл с пробелами.txt" do |f| post = ThePost.create! file: f post.file.url.should =~ /\/файл с пробелами\.txt/ post.file.file.path =~ /файл с пробелами\.txt/ end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rad_kit-0.0.10 | spec/models/uploader_spec.rb |
rad_kit-0.0.9 | spec/models/uploader_spec.rb |