Sha256: d838ff4cfb13b6bc01eac3320f2444f4787866a6ef7f34c9ba72bf6f72ccb2ce
Contents?: true
Size: 744 Bytes
Versions: 4
Compression:
Stored size: 744 Bytes
Contents
require 'spec/helper' class MainController < Ramaze::Controller def index 'hello' end def test 'test' end end describe 'Route' do behaves_like 'http' ramaze :public_root => __DIR__/:rewrite Ramaze::Rewrite[%r|^/index.php(.*)$|] = "%s" it 'should work with the index action' do r = get('/index.php') [ r.status, r.body ].should == [ 200, 'hello' ] r = get('/index.php/') [ r.status, r.body ].should == [ 200, 'hello' ] end it 'should work with other actions' do r = get('/index.php/test') [ r.status, r.body ].should == [ 200, 'test' ] end it 'should rewrite urls for files' do r = get('/index.php/file.css') [ r.status, r.body ].should == [ 200, 'this is css' ] end end
Version data entries
4 entries across 4 versions & 3 rubygems
Version | Path |
---|---|
Pistos-ramaze-2008.09 | spec/ramaze/rewrite.rb |
manveru-ramaze-2008.09 | spec/ramaze/rewrite.rb |
manveru-ramaze-2008.10 | spec/ramaze/rewrite.rb |
ramaze-2008.11 | spec/ramaze/rewrite.rb |