Sha256: e9d594033815727b44ff9affc96d4aed18e99ae58f50fa9bd9b721166cd03cbc

Contents?: true

Size: 845 Bytes

Versions: 5

Compression:

Stored size: 845 Bytes

Contents

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

require File.expand_path('../../../../spec/helper', __FILE__)

module SpecBlog
  class Controller < Ramaze::Controller
    map nil, :blog
    app.location = '/'
  end

  class Posts < Controller
    map '/posts'

    def index
      'The Blog Posts'
    end
  end
end

module SpecWiki
  class Controller < Ramaze::Controller
    map nil, :wiki
    app.location = '/wiki'
  end

  class Pages < Controller
    map '/pages'

    def index
      'The Wiki Page'
    end
  end
end

describe Ramaze::App do
  behaves_like :rack_test

  it "Doesn't set location for app automatically" do
    get('/wiki/pages').body.should == 'The Wiki Page'
    get('/posts').body.should == 'The Blog Posts'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ramaze-2023.01.06 spec/ramaze/app/location.rb
ramaze-2012.12.08 spec/ramaze/app/location.rb
ramaze-2012.12.08b spec/ramaze/app/location.rb
ramaze-2012.04.14 spec/ramaze/app/location.rb
ramaze-2012.03.07 spec/ramaze/app/location.rb