aldebaran 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +13 -0
- data/.travis.yml +16 -0
- data/.yardopts +4 -0
- data/AUTHORS +4 -0
- data/Gemfile +77 -0
- data/KNOWN_ISSUES +5 -0
- data/LICENSE +22 -0
- data/README.rdoc +1900 -0
- data/Rakefile +175 -0
- data/aldebaran.gemspec +19 -0
- data/lib/aldebaran.rb +7 -0
- data/lib/aldebaran/base.rb +1600 -0
- data/lib/aldebaran/images/404.png +0 -0
- data/lib/aldebaran/images/500.png +0 -0
- data/lib/aldebaran/main.rb +28 -0
- data/lib/aldebaran/showexceptions.rb +340 -0
- data/lib/aldebaran/version.rb +3 -0
- data/test/aldebaran_test.rb +17 -0
- data/test/base_test.rb +160 -0
- data/test/builder_test.rb +95 -0
- data/test/coffee_test.rb +92 -0
- data/test/contest.rb +98 -0
- data/test/creole_test.rb +65 -0
- data/test/delegator_test.rb +162 -0
- data/test/encoding_test.rb +20 -0
- data/test/erb_test.rb +104 -0
- data/test/extensions_test.rb +100 -0
- data/test/filter_test.rb +397 -0
- data/test/haml_test.rb +101 -0
- data/test/helper.rb +115 -0
- data/test/helpers_test.rb +1192 -0
- data/test/less_test.rb +67 -0
- data/test/liquid_test.rb +59 -0
- data/test/mapped_error_test.rb +259 -0
- data/test/markaby_test.rb +80 -0
- data/test/markdown_test.rb +81 -0
- data/test/middleware_test.rb +68 -0
- data/test/nokogiri_test.rb +69 -0
- data/test/public/favicon.ico +0 -0
- data/test/radius_test.rb +59 -0
- data/test/rdoc_test.rb +65 -0
- data/test/readme_test.rb +136 -0
- data/test/request_test.rb +45 -0
- data/test/response_test.rb +61 -0
- data/test/result_test.rb +98 -0
- data/test/route_added_hook_test.rb +59 -0
- data/test/routing_test.rb +1096 -0
- data/test/sass_test.rb +115 -0
- data/test/scss_test.rb +88 -0
- data/test/server_test.rb +48 -0
- data/test/settings_test.rb +493 -0
- data/test/slim_test.rb +98 -0
- data/test/static_test.rb +178 -0
- data/test/streaming_test.rb +100 -0
- data/test/templates_test.rb +298 -0
- data/test/textile_test.rb +65 -0
- data/test/views/a/in_a.str +1 -0
- data/test/views/ascii.erb +2 -0
- data/test/views/b/in_b.str +1 -0
- data/test/views/calc.html.erb +1 -0
- data/test/views/error.builder +3 -0
- data/test/views/error.erb +3 -0
- data/test/views/error.haml +3 -0
- data/test/views/error.sass +2 -0
- data/test/views/explicitly_nested.str +1 -0
- data/test/views/foo/hello.test +1 -0
- data/test/views/hello.builder +1 -0
- data/test/views/hello.coffee +1 -0
- data/test/views/hello.creole +1 -0
- data/test/views/hello.erb +1 -0
- data/test/views/hello.haml +1 -0
- data/test/views/hello.less +5 -0
- data/test/views/hello.liquid +1 -0
- data/test/views/hello.mab +1 -0
- data/test/views/hello.md +1 -0
- data/test/views/hello.nokogiri +1 -0
- data/test/views/hello.radius +1 -0
- data/test/views/hello.rdoc +1 -0
- data/test/views/hello.sass +2 -0
- data/test/views/hello.scss +3 -0
- data/test/views/hello.slim +1 -0
- data/test/views/hello.str +1 -0
- data/test/views/hello.test +1 -0
- data/test/views/hello.textile +1 -0
- data/test/views/layout2.builder +3 -0
- data/test/views/layout2.erb +2 -0
- data/test/views/layout2.haml +2 -0
- data/test/views/layout2.liquid +2 -0
- data/test/views/layout2.mab +2 -0
- data/test/views/layout2.nokogiri +3 -0
- data/test/views/layout2.radius +2 -0
- data/test/views/layout2.slim +3 -0
- data/test/views/layout2.str +2 -0
- data/test/views/layout2.test +1 -0
- data/test/views/nested.str +1 -0
- data/test/views/utf8.erb +2 -0
- metadata +231 -0
@@ -0,0 +1,81 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
MarkdownTest = proc do
|
4
|
+
def markdown_app(&block)
|
5
|
+
mock_app do
|
6
|
+
set :views, File.dirname(__FILE__) + '/views'
|
7
|
+
get '/', &block
|
8
|
+
end
|
9
|
+
get '/'
|
10
|
+
end
|
11
|
+
|
12
|
+
def setup
|
13
|
+
Tilt.prefer engine, 'markdown', 'mkd', 'md'
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'uses the correct engine' do
|
18
|
+
assert_equal engine, Tilt[:md]
|
19
|
+
assert_equal engine, Tilt[:mkd]
|
20
|
+
assert_equal engine, Tilt[:markdown]
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'renders inline markdown strings' do
|
24
|
+
markdown_app { markdown '# Hiya' }
|
25
|
+
assert ok?
|
26
|
+
assert_like "<h1>Hiya</h1>\n", body
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'renders .markdown files in views path' do
|
30
|
+
markdown_app { markdown :hello }
|
31
|
+
assert ok?
|
32
|
+
assert_like "<h1>Hello From Markdown</h1>", body
|
33
|
+
end
|
34
|
+
|
35
|
+
it "raises error if template not found" do
|
36
|
+
mock_app { get('/') { markdown :no_such_template } }
|
37
|
+
assert_raise(Errno::ENOENT) { get('/') }
|
38
|
+
end
|
39
|
+
|
40
|
+
it "renders with inline layouts" do
|
41
|
+
mock_app do
|
42
|
+
layout { 'THIS. IS. #{yield.upcase}!' }
|
43
|
+
get('/') { markdown 'Sparta', :layout_engine => :str }
|
44
|
+
end
|
45
|
+
get '/'
|
46
|
+
assert ok?
|
47
|
+
assert_like 'THIS. IS. <P>SPARTA</P>!', body
|
48
|
+
end
|
49
|
+
|
50
|
+
it "renders with file layouts" do
|
51
|
+
markdown_app { markdown 'Hello World', :layout => :layout2, :layout_engine => :erb }
|
52
|
+
assert ok?
|
53
|
+
assert_body "ERB Layout!\n<p>Hello World</p>"
|
54
|
+
end
|
55
|
+
|
56
|
+
it "can be used in a nested fashion for partials and whatnot" do
|
57
|
+
mock_app do
|
58
|
+
template(:inner) { "hi" }
|
59
|
+
template(:outer) { "<outer><%= markdown :inner %></outer>" }
|
60
|
+
get '/' do
|
61
|
+
erb :outer
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
get '/'
|
66
|
+
assert ok?
|
67
|
+
assert_like '<outer><p>hi</p></outer>', body
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Will generate RDiscountTest, KramdownTest, etc.
|
72
|
+
Tilt.mappings['md'].each do |t|
|
73
|
+
begin
|
74
|
+
t.new { "" }
|
75
|
+
klass = Class.new(Test::Unit::TestCase) { define_method(:engine) { t }}
|
76
|
+
klass.class_eval(&MarkdownTest)
|
77
|
+
Object.const_set t.name[/[^:]+(?=Template$)/] << "Test", klass
|
78
|
+
rescue LoadError
|
79
|
+
warn "#{$!}: skipping markdown tests with #{t}"
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
class MiddlewareTest < Test::Unit::TestCase
|
4
|
+
setup do
|
5
|
+
@app = mock_app(aldebaran::Application) {
|
6
|
+
get '/*' do
|
7
|
+
response.headers['X-Tests'] = env['test.ran'].
|
8
|
+
map { |n| n.split('::').last }.
|
9
|
+
join(', ')
|
10
|
+
env['PATH_INFO']
|
11
|
+
end
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
class MockMiddleware < Struct.new(:app)
|
16
|
+
def call(env)
|
17
|
+
(env['test.ran'] ||= []) << self.class.to_s
|
18
|
+
app.call(env)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
class UpcaseMiddleware < MockMiddleware
|
23
|
+
def call(env)
|
24
|
+
env['PATH_INFO'] = env['PATH_INFO'].upcase
|
25
|
+
super
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
it "is added with aldebaran::Application.use" do
|
30
|
+
@app.use UpcaseMiddleware
|
31
|
+
get '/hello-world'
|
32
|
+
assert ok?
|
33
|
+
assert_equal '/HELLO-WORLD', body
|
34
|
+
end
|
35
|
+
|
36
|
+
class DowncaseMiddleware < MockMiddleware
|
37
|
+
def call(env)
|
38
|
+
env['PATH_INFO'] = env['PATH_INFO'].downcase
|
39
|
+
super
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it "runs in the order defined" do
|
44
|
+
@app.use UpcaseMiddleware
|
45
|
+
@app.use DowncaseMiddleware
|
46
|
+
get '/Foo'
|
47
|
+
assert_equal "/foo", body
|
48
|
+
assert_equal "UpcaseMiddleware, DowncaseMiddleware", response['X-Tests']
|
49
|
+
end
|
50
|
+
|
51
|
+
it "resets the prebuilt pipeline when new middleware is added" do
|
52
|
+
@app.use UpcaseMiddleware
|
53
|
+
get '/Foo'
|
54
|
+
assert_equal "/FOO", body
|
55
|
+
@app.use DowncaseMiddleware
|
56
|
+
get '/Foo'
|
57
|
+
assert_equal '/foo', body
|
58
|
+
assert_equal "UpcaseMiddleware, DowncaseMiddleware", response['X-Tests']
|
59
|
+
end
|
60
|
+
|
61
|
+
it "works when app is used as middleware" do
|
62
|
+
@app.use UpcaseMiddleware
|
63
|
+
@app = @app.new
|
64
|
+
get '/Foo'
|
65
|
+
assert_equal "/FOO", body
|
66
|
+
assert_equal "UpcaseMiddleware", response['X-Tests']
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'nokogiri'
|
5
|
+
|
6
|
+
class NokogiriTest < Test::Unit::TestCase
|
7
|
+
def nokogiri_app(&block)
|
8
|
+
mock_app do
|
9
|
+
set :views, File.dirname(__FILE__) + '/views'
|
10
|
+
get '/', &block
|
11
|
+
end
|
12
|
+
get '/'
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'renders inline Nokogiri strings' do
|
16
|
+
nokogiri_app { nokogiri 'xml' }
|
17
|
+
assert ok?
|
18
|
+
assert_body %(<?xml version="1.0"?>\n)
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'renders inline blocks' do
|
22
|
+
nokogiri_app do
|
23
|
+
@name = "Frank & Mary"
|
24
|
+
nokogiri do |xml|
|
25
|
+
xml.couple @name
|
26
|
+
end
|
27
|
+
end
|
28
|
+
assert ok?
|
29
|
+
assert_body %(<?xml version="1.0"?>\n<couple>Frank & Mary</couple>\n)
|
30
|
+
end
|
31
|
+
|
32
|
+
it 'renders .nokogiri files in views path' do
|
33
|
+
nokogiri_app do
|
34
|
+
@name = "Blue"
|
35
|
+
nokogiri :hello
|
36
|
+
end
|
37
|
+
assert ok?
|
38
|
+
assert_body "<?xml version=\"1.0\"?>\n<exclaim>You're my boy, Blue!</exclaim>\n"
|
39
|
+
end
|
40
|
+
|
41
|
+
it "renders with inline layouts" do
|
42
|
+
next if Tilt::VERSION <= "1.1"
|
43
|
+
mock_app do
|
44
|
+
layout { %(xml.layout { xml << yield }) }
|
45
|
+
get('/') { nokogiri %(xml.em 'Hello World') }
|
46
|
+
end
|
47
|
+
get '/'
|
48
|
+
assert ok?
|
49
|
+
assert_body %(<?xml version="1.0"?>\n<layout>\n <em>Hello World</em>\n</layout>\n)
|
50
|
+
end
|
51
|
+
|
52
|
+
it "renders with file layouts" do
|
53
|
+
next if Tilt::VERSION <= "1.1"
|
54
|
+
nokogiri_app do
|
55
|
+
nokogiri %(xml.em 'Hello World'), :layout => :layout2
|
56
|
+
end
|
57
|
+
assert ok?
|
58
|
+
assert_body %(<?xml version="1.0"?>\n<layout>\n <em>Hello World</em>\n</layout>\n)
|
59
|
+
end
|
60
|
+
|
61
|
+
it "raises error if template not found" do
|
62
|
+
mock_app { get('/') { nokogiri :no_such_template } }
|
63
|
+
assert_raise(Errno::ENOENT) { get('/') }
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
rescue LoadError
|
68
|
+
warn "#{$!.to_s}: skipping nokogiri tests"
|
69
|
+
end
|
File without changes
|
data/test/radius_test.rb
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'radius'
|
5
|
+
|
6
|
+
class RadiusTest < Test::Unit::TestCase
|
7
|
+
def radius_app(&block)
|
8
|
+
mock_app do
|
9
|
+
set :views, File.dirname(__FILE__) + '/views'
|
10
|
+
get '/', &block
|
11
|
+
end
|
12
|
+
get '/'
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'renders inline radius strings' do
|
16
|
+
radius_app { radius '<h1>Hiya</h1>' }
|
17
|
+
assert ok?
|
18
|
+
assert_equal "<h1>Hiya</h1>", body
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'renders .radius files in views path' do
|
22
|
+
radius_app { radius :hello }
|
23
|
+
assert ok?
|
24
|
+
assert_equal "<h1>Hello From Radius</h1>\n", body
|
25
|
+
end
|
26
|
+
|
27
|
+
it "renders with inline layouts" do
|
28
|
+
mock_app do
|
29
|
+
layout { "<h1>THIS. IS. <r:yield /></h1>" }
|
30
|
+
get('/') { radius '<EM>SPARTA</EM>' }
|
31
|
+
end
|
32
|
+
get '/'
|
33
|
+
assert ok?
|
34
|
+
assert_equal "<h1>THIS. IS. <EM>SPARTA</EM></h1>", body
|
35
|
+
end
|
36
|
+
|
37
|
+
it "renders with file layouts" do
|
38
|
+
radius_app { radius 'Hello World', :layout => :layout2 }
|
39
|
+
assert ok?
|
40
|
+
assert_equal "<h1>Radius Layout!</h1>\n<p>Hello World</p>\n", body
|
41
|
+
end
|
42
|
+
|
43
|
+
it "raises error if template not found" do
|
44
|
+
mock_app { get('/') { radius :no_such_template } }
|
45
|
+
assert_raise(Errno::ENOENT) { get('/') }
|
46
|
+
end
|
47
|
+
|
48
|
+
it "allows passing locals" do
|
49
|
+
radius_app do
|
50
|
+
radius '<r:value />', :locals => { :value => 'foo' }
|
51
|
+
end
|
52
|
+
assert ok?
|
53
|
+
assert_equal 'foo', body
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
rescue LoadError
|
58
|
+
warn "#{$!.to_s}: skipping radius tests"
|
59
|
+
end
|
data/test/rdoc_test.rb
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
require File.expand_path('../helper', __FILE__)
|
2
|
+
|
3
|
+
begin
|
4
|
+
require 'rdoc/markup/to_html'
|
5
|
+
|
6
|
+
class RdocTest < Test::Unit::TestCase
|
7
|
+
def rdoc_app(&block)
|
8
|
+
mock_app do
|
9
|
+
set :views, File.dirname(__FILE__) + '/views'
|
10
|
+
get '/', &block
|
11
|
+
end
|
12
|
+
get '/'
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'renders inline rdoc strings' do
|
16
|
+
rdoc_app { rdoc '= Hiya' }
|
17
|
+
assert ok?
|
18
|
+
assert_body "<h1>Hiya</h1>"
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'renders .rdoc files in views path' do
|
22
|
+
rdoc_app { rdoc :hello }
|
23
|
+
assert ok?
|
24
|
+
assert_body "<h1>Hello From RDoc</h1>"
|
25
|
+
end
|
26
|
+
|
27
|
+
it "raises error if template not found" do
|
28
|
+
mock_app { get('/') { rdoc :no_such_template } }
|
29
|
+
assert_raise(Errno::ENOENT) { get('/') }
|
30
|
+
end
|
31
|
+
|
32
|
+
it "renders with inline layouts" do
|
33
|
+
mock_app do
|
34
|
+
layout { 'THIS. IS. #{yield.upcase}!' }
|
35
|
+
get('/') { rdoc 'Sparta', :layout_engine => :str }
|
36
|
+
end
|
37
|
+
get '/'
|
38
|
+
assert ok?
|
39
|
+
assert_like 'THIS. IS. <P>SPARTA</P>!', body
|
40
|
+
end
|
41
|
+
|
42
|
+
it "renders with file layouts" do
|
43
|
+
rdoc_app { rdoc 'Hello World', :layout => :layout2, :layout_engine => :erb }
|
44
|
+
assert ok?
|
45
|
+
assert_body "ERB Layout!\n<p>Hello World</p>"
|
46
|
+
end
|
47
|
+
|
48
|
+
it "can be used in a nested fashion for partials and whatnot" do
|
49
|
+
mock_app do
|
50
|
+
template(:inner) { "hi" }
|
51
|
+
template(:outer) { "<outer><%= rdoc :inner %></outer>" }
|
52
|
+
get '/' do
|
53
|
+
erb :outer
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
get '/'
|
58
|
+
assert ok?
|
59
|
+
assert_like '<outer><p>hi</p></outer>', body
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
rescue LoadError
|
64
|
+
warn "#{$!.to_s}: skipping rdoc tests"
|
65
|
+
end
|
data/test/readme_test.rb
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
# Tests to check if all the README examples work.
|
2
|
+
require File.expand_path('../helper', __FILE__)
|
3
|
+
|
4
|
+
class ReadmeTest < Test::Unit::TestCase
|
5
|
+
example do
|
6
|
+
mock_app { get('/') { 'Hello world!' } }
|
7
|
+
get '/'
|
8
|
+
assert_body 'Hello world!'
|
9
|
+
end
|
10
|
+
|
11
|
+
section "Routes" do
|
12
|
+
example do
|
13
|
+
mock_app do
|
14
|
+
get '/' do
|
15
|
+
".. show something .."
|
16
|
+
end
|
17
|
+
|
18
|
+
post '/' do
|
19
|
+
".. create something .."
|
20
|
+
end
|
21
|
+
|
22
|
+
put '/' do
|
23
|
+
".. replace something .."
|
24
|
+
end
|
25
|
+
|
26
|
+
patch '/' do
|
27
|
+
".. modify something .."
|
28
|
+
end
|
29
|
+
|
30
|
+
delete '/' do
|
31
|
+
".. annihilate something .."
|
32
|
+
end
|
33
|
+
|
34
|
+
options '/' do
|
35
|
+
".. appease something .."
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
get '/'
|
40
|
+
assert_body '.. show something ..'
|
41
|
+
|
42
|
+
post '/'
|
43
|
+
assert_body '.. create something ..'
|
44
|
+
|
45
|
+
put '/'
|
46
|
+
assert_body '.. replace something ..'
|
47
|
+
|
48
|
+
patch '/'
|
49
|
+
assert_body '.. modify something ..'
|
50
|
+
|
51
|
+
delete '/'
|
52
|
+
assert_body '.. annihilate something ..'
|
53
|
+
|
54
|
+
options '/'
|
55
|
+
assert_body '.. appease something ..'
|
56
|
+
end
|
57
|
+
|
58
|
+
example do
|
59
|
+
mock_app do
|
60
|
+
get '/hello/:name' do
|
61
|
+
# matches "GET /hello/foo" and "GET /hello/bar"
|
62
|
+
# params[:name] is 'foo' or 'bar'
|
63
|
+
"Hello #{params[:name]}!"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
get '/hello/foo'
|
68
|
+
assert_body 'Hello foo!'
|
69
|
+
|
70
|
+
get '/hello/bar'
|
71
|
+
assert_body 'Hello bar!'
|
72
|
+
end
|
73
|
+
|
74
|
+
example do
|
75
|
+
mock_app do
|
76
|
+
get '/hello/:name' do |n|
|
77
|
+
"Hello #{n}!"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
get '/hello/foo'
|
82
|
+
assert_body 'Hello foo!'
|
83
|
+
|
84
|
+
get '/hello/bar'
|
85
|
+
assert_body 'Hello bar!'
|
86
|
+
end
|
87
|
+
|
88
|
+
example do
|
89
|
+
mock_app do
|
90
|
+
get '/say/*/to/*' do
|
91
|
+
# matches /say/hello/to/world
|
92
|
+
params[:splat].inspect # => ["hello", "world"]
|
93
|
+
end
|
94
|
+
|
95
|
+
get '/download/*.*' do
|
96
|
+
# matches /download/path/to/file.xml
|
97
|
+
params[:splat].inspect # => ["path/to/file", "xml"]
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
get "/say/hello/to/world"
|
102
|
+
assert_body '["hello", "world"]'
|
103
|
+
|
104
|
+
get "/download/path/to/file.xml"
|
105
|
+
assert_body '["path/to/file", "xml"]'
|
106
|
+
end
|
107
|
+
|
108
|
+
example do
|
109
|
+
mock_app do
|
110
|
+
get %r{/hello/([\w]+)} do
|
111
|
+
"Hello, #{params[:captures].first}!"
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
get '/hello/foo'
|
116
|
+
assert_body 'Hello, foo!'
|
117
|
+
|
118
|
+
get '/hello/bar'
|
119
|
+
assert_body 'Hello, bar!'
|
120
|
+
end
|
121
|
+
|
122
|
+
example do
|
123
|
+
mock_app do
|
124
|
+
get %r{/hello/([\w]+)} do |c|
|
125
|
+
"Hello, #{c}!"
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
get '/hello/foo'
|
130
|
+
assert_body 'Hello, foo!'
|
131
|
+
|
132
|
+
get '/hello/bar'
|
133
|
+
assert_body 'Hello, bar!'
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|