Sha256: 943e8ac827bb833b121d147aa9491db6f4508886a4807c91749e538e4279350a

Contents?: true

Size: 736 Bytes

Versions: 22

Compression:

Stored size: 736 Bytes

Contents

#          Copyright (c) 2006 Michael Fellinger m.fellinger@gmail.com
# All files in this distribution are subject to the terms of the Ruby license.

require 'spec/helper'

class TCDispatcherController < Ramaze::Controller
  map '/'

  def index
    "Hello, World!"
  end
end

describe "Dispatcher" do
  behaves_like 'http'
  ramaze :ignore => ['/favicon.ico', '/robots.txt'],
    :ignore_body => 'File not found'

  it 'should resolve a normal request' do
    page = get('/')
    page.status.should == 200
    page.body.should == 'Hello, World!'
  end

  it 'should ignore /foo.ico' do
    Ramaze::Global.ignore = ['/foo.ico']
    page = get('/foo.ico')
    page.status.should == 404
    page.body.should == 'File not found'
  end
end

Version data entries

22 entries across 22 versions & 5 rubygems

Version Path
Pistos-ramaze-2008.09 spec/ramaze/dispatcher.rb
Pistos-ramaze-2008.12 spec/ramaze/dispatcher.rb
Pistos-ramaze-2009.01 spec/ramaze/dispatcher.rb
Pistos-ramaze-2009.02 spec/ramaze/dispatcher.rb
clivecrous-ramaze-0.3.9.5 spec/ramaze/dispatcher.rb
manveru-ramaze-2008.07 spec/ramaze/dispatcher.rb
manveru-ramaze-2008.08 spec/ramaze/dispatcher.rb
manveru-ramaze-2008.09 spec/ramaze/dispatcher.rb
manveru-ramaze-2008.10 spec/ramaze/dispatcher.rb
manveru-ramaze-2008.12 spec/ramaze/dispatcher.rb
manveru-ramaze-2009.01 spec/ramaze/dispatcher.rb
ptomato-ramaze-2009.02.1 spec/ramaze/dispatcher.rb
ptomato-ramaze-2009.02 spec/ramaze/dispatcher.rb
ramaze-0.3.5 spec/ramaze/dispatcher.rb
ramaze-0.3.0 spec/ramaze/dispatcher.rb
ramaze-0.3.9.1 spec/ramaze/dispatcher.rb
ramaze-2009.01 spec/ramaze/dispatcher.rb
ramaze-2008.06 spec/ramaze/dispatcher.rb
ramaze-0.3.9 spec/ramaze/dispatcher.rb
ramaze-2008.11 spec/ramaze/dispatcher.rb