Sha256: bac99df701685829c8a0568266091c67affdfe452b228cb9778e45f881a26676

Contents?: true

Size: 846 Bytes

Versions: 13

Compression:

Stored size: 846 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__)

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

13 entries across 13 versions & 2 rubygems

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