Sha256: e9da6ee3b8bbd5a3100dbed4804c610ec05e4fb24353f2ebee135d45795dbb98

Contents?: true

Size: 960 Bytes

Versions: 14

Compression:

Stored size: 960 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 File.expand_path('../../../spec/helper', __FILE__)

class SpecAppMain < Ramaze::Controller
  map '/', :core

  def index
    'core main'
  end
end

class SpecAppTwo < Ramaze::Controller
  map '/two', :core

  def index
    'core two'
  end
end

class SpecAppOtherMain < Ramaze::Controller
  map '/', :other

  def index
    'other main'
  end
end

class SpecAppOtherTwo < Ramaze::Controller
  map '/two', :other

  def index
    'other two'
  end
end

Ramaze::App[:core].location = '/'
Ramaze::App[:other].location = '/other'

describe Ramaze::App do
  behaves_like :rack_test

  it 'handles call with rack env' do
    get('/').body.should == 'core main'
    get('/two').body.should == 'core two'
    get('/other').body.should == 'other main'
    get('/other/two').body.should == 'other two'
  end
end

Version data entries

14 entries across 14 versions & 3 rubygems

Version Path
Pistos-ramaze-2009.06.12 spec/ramaze/app.rb
manveru-ramaze-2009.07 spec/ramaze/app.rb
ramaze-2011.12.28 spec/ramaze/app.rb
ramaze-2011.10.23 spec/ramaze/app.rb
ramaze-2011.07.25 spec/ramaze/app.rb
ramaze-2011.01.30 spec/ramaze/app.rb
ramaze-2011.01 spec/ramaze/app.rb
ramaze-2010.06.18 spec/ramaze/app.rb
ramaze-2010.04.04 spec/ramaze/app.rb
ramaze-2010.04 spec/ramaze/app.rb
ramaze-2010.03 spec/ramaze/app.rb
ramaze-2010.01 spec/ramaze/app.rb
ramaze-2009.10 spec/ramaze/app.rb
ramaze-2009.07 spec/ramaze/app.rb