Sha256: c092cab9077096e55f82ad458845099aecb59e49c6454e4f39016c56e27d334d

Contents?: true

Size: 297 Bytes

Versions: 14

Compression:

Stored size: 297 Bytes

Contents

# This is a testable class that emulates an uploaded file
class MockFile
  attr_reader :path
	def initialize(path)
		@path = path
	end
	
	def size
  	1
  end
  
  def original_filename
    @path.split('/').last
  end
  
  def read
    File.open(@path) { |f| f.read }
  end
  
  def rewind; end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
tvdeyen-fleximage-1.2.0 test/mock_file.rb
tvdeyen-fleximage-1.1.1 test/mock_file.rb
tvdeyen-fleximage-1.0.9 test/mock_file.rb
tvdeyen-fleximage-1.0.8 test/mock_file.rb
tvdeyen-fleximage-1.0.7 test/mock_file.rb
robinboening-fleximage-1.0.6 test/mock_file.rb
robinboening-fleximage-1.0.4 test/mock_file.rb
tvdeyen-fleximage-1.0.5 test/mock_file.rb
fleximage-1.0.4 test/mock_file.rb
dougmcbride-fleximage-1.0.3 test/mock_file.rb
fleximage-1.0.3 test/mock_file.rb
fleximage-1.0.2 test/mock_file.rb
fleximage-1.0.1 test/mock_file.rb
fleximage-1.0.0 test/mock_file.rb