Sha256: 06b03354f67c98a973b130e7b0a46a273bcb913773fbeb8bb5ce24adac5da6f0
Contents?: true
Size: 825 Bytes
Versions: 10
Compression:
Stored size: 825 Bytes
Contents
# Copyright (c) 2009 Michael Fellinger m.fellinger@gmail.com # All files in this distribution are subject to the terms of the Ruby license. require 'spec/helper' class MainController < Ramaze::Controller map '/' define_method('file.ext'){ 'file.ext' } define_method('css__file.css'){ 'file.css' } define_method('path__to__js__file.js'){ 'file.js' } define_method('other__greet__other'){ @greet = 'hi' } end describe 'Controller resolving' do behaves_like :mock it 'should work with .' do get('/file.ext').body.should == 'file.ext' end it 'should work with /' do get('/css/file.css').body.should == 'file.css' get('/path/to/js/file.js').body.should == 'file.js' end it 'should find templates' do get('/other/greet/other').body.should == '<html>Other: hi</html>' end end
Version data entries
10 entries across 10 versions & 3 rubygems