Sha256: bee1a678c20b75b15531618e39ed4e5e1476a9d8c3318c5d5c7ed920258da930

Contents?: true

Size: 388 Bytes

Versions: 3

Compression:

Stored size: 388 Bytes

Contents

require 'test_helper'

class TestMapper < Test::Unit::TestCase
  def setup
    @client = MockMogileFsClient.new
  end

  def test_custom_key_mapping
    @client.expects(:get_file_data).with("image.png").returns("")
    app_with(
      :path   => %r{^/assets/*},
      :client => @client,
      :mapper => lambda { |p| p.sub('/assets/', '') }
    )

    get '/assets/image.png'
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rack-mogilefs-0.3.2 test/mapper_test.rb
rack-mogilefs-0.3.1 test/mapper_test.rb
rack-mogilefs-0.3.0 test/mapper_test.rb