Sha256: 1f8fd7fbd83923bb5075b298fcc6f3740ef1ffffd82bb5dec38e9d405d633d9d

Contents?: true

Size: 773 Bytes

Versions: 8

Compression:

Stored size: 773 Bytes

Contents

require 'spec/helper'

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

8 entries across 8 versions & 3 rubygems

Version Path
manveru-ramaze-2009.06.04 spec/ramaze/app.rb
manveru-ramaze-2009.06.12 spec/ramaze/app.rb
manveru-ramaze-2009.06 spec/ramaze/app.rb
rjspotter-ramaze-2009.06.29 spec/ramaze/app.rb
rjspotter-ramaze-2009.06.31 spec/ramaze/app.rb
ramaze-2009.06 spec/ramaze/app.rb
ramaze-2009.06.12 spec/ramaze/app.rb
ramaze-2009.06.04 spec/ramaze/app.rb