Sha256: 7a895b4d2084f92df09c9d217bcf9be9ebcff0d3a1ff0f7240f597c05cdc937f
Contents?: true
Size: 828 Bytes
Versions: 3
Compression:
Stored size: 828 Bytes
Contents
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the MIT license. require File.expand_path('../../../spec/helper', __FILE__) class SpecFilesCore < Ramaze::Controller map '/', :core end class SpecFilesOther < Ramaze::Controller map '/', :other end Ramaze::App[:core].location = '/' Ramaze::App[:core].options.publics = 'files/public_1' Ramaze::App[:other].location = '/other' Ramaze::App[:other].options.publics = 'files/public_2' describe Ramaze::Files do behaves_like :rack_test it 'serves files for core app from public_1' do get('/plain.txt').body.should == "Just some text in a file\n" end it 'serves files for other app from public_2' do get('/other/rich.txt').body.should == "Some rich text in here\n" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ramaze-2023.01.06 | spec/ramaze/files.rb |
ramaze-2012.12.08 | spec/ramaze/files.rb |
ramaze-2012.12.08b | spec/ramaze/files.rb |