Sha256: 9f21f727ac33e752a881a8be5d386c98a7f562e94b6eb971dce3f683ca294a53

Contents?: true

Size: 567 Bytes

Versions: 10

Compression:

Stored size: 567 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Lolita::Upload::File do
  
  let(:dbi){
    Lolita::DBI::Base.new(Post)
  }
  let(:normal_file){
      Lolita::Upload::File.new(:asset=>File.open(Support.get_file("normal_file.txt")))
  }
  let(:tab){
    Lolita::Configuration::Tab::Files.new(dbi)
  }

  context "upload" do
      it "should be allowed" do
        file=Lolita::Upload::File.create(:asset=>File.open(Support.get_file("large_file.txt")))
        file.asset.current_path.should match(/large_file\.txt$/)
      end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
lolita-file-upload-1.0.5 spec/models/file_spec.rb
lolita-file-upload-1.0.4 spec/models/file_spec.rb
lolita-file-upload-1.0.3 spec/models/file_spec.rb
lolita-file-upload-1.0.2 spec/models/file_spec.rb
lolita-file-upload-1.0.1 spec/models/file_spec.rb
lolita-file-upload-1.0.0 spec/models/file_spec.rb
lolita-file-upload-0.8.3 spec/models/file_spec.rb
lolita-file-upload-0.8.2 spec/models/file_spec.rb
lolita-file-upload-0.8.1 spec/models/file_spec.rb
lolita-file-upload-0.8.0 spec/models/file_spec.rb