Syd-sinatra 0.3.2 → 0.9.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. data/AUTHORS +40 -0
  2. data/CHANGES +189 -0
  3. data/README.rdoc +148 -119
  4. data/Rakefile +34 -10
  5. data/{test → compat}/app_test.rb +11 -10
  6. data/{test → compat}/application_test.rb +21 -5
  7. data/compat/builder_test.rb +101 -0
  8. data/compat/erb_test.rb +136 -0
  9. data/{test → compat}/events_test.rb +16 -3
  10. data/compat/filter_test.rb +30 -0
  11. data/compat/haml_test.rb +233 -0
  12. data/compat/helper.rb +30 -0
  13. data/compat/mapped_error_test.rb +72 -0
  14. data/{test → compat}/pipeline_test.rb +9 -4
  15. data/compat/sass_test.rb +57 -0
  16. data/{test → compat}/streaming_test.rb +4 -1
  17. data/lib/sinatra/base.rb +843 -0
  18. data/lib/sinatra/compat.rb +239 -0
  19. data/lib/sinatra/main.rb +48 -0
  20. data/lib/sinatra/test/bacon.rb +17 -0
  21. data/lib/sinatra/test/rspec.rb +7 -8
  22. data/lib/sinatra/test/spec.rb +3 -4
  23. data/lib/sinatra/test/unit.rb +3 -5
  24. data/lib/sinatra/test.rb +114 -0
  25. data/lib/sinatra.rb +6 -1468
  26. data/sinatra.gemspec +68 -35
  27. data/test/base_test.rb +68 -0
  28. data/test/builder_test.rb +50 -87
  29. data/test/data/reload_app_file.rb +3 -0
  30. data/test/erb_test.rb +38 -124
  31. data/test/filter_test.rb +65 -20
  32. data/test/haml_test.rb +51 -216
  33. data/test/helper.rb +23 -5
  34. data/test/helpers_test.rb +361 -0
  35. data/test/mapped_error_test.rb +137 -49
  36. data/test/middleware_test.rb +58 -0
  37. data/test/options_test.rb +97 -0
  38. data/test/reload_test.rb +61 -0
  39. data/test/request_test.rb +18 -0
  40. data/test/result_test.rb +88 -0
  41. data/test/routing_test.rb +391 -0
  42. data/test/sass_test.rb +27 -48
  43. data/test/sinatra_test.rb +13 -0
  44. data/test/static_test.rb +57 -0
  45. data/test/templates_test.rb +88 -0
  46. data/test/views/hello.builder +1 -0
  47. data/test/views/hello.erb +1 -0
  48. data/test/views/hello.haml +1 -0
  49. data/test/views/hello.sass +2 -0
  50. data/test/views/hello.test +1 -0
  51. data/test/views/layout2.builder +3 -0
  52. data/test/views/layout2.erb +2 -0
  53. data/test/views/layout2.haml +2 -0
  54. data/test/views/layout2.test +1 -0
  55. metadata +79 -47
  56. data/ChangeLog +0 -78
  57. data/lib/sinatra/test/methods.rb +0 -76
  58. data/test/event_context_test.rb +0 -15
  59. /data/{test → compat}/custom_error_test.rb +0 -0
  60. /data/{test → compat}/public/foo.xml +0 -0
  61. /data/{test → compat}/sessions_test.rb +0 -0
  62. /data/{test → compat}/sym_params_test.rb +0 -0
  63. /data/{test → compat}/template_test.rb +0 -0
  64. /data/{test → compat}/use_in_file_templates_test.rb +0 -0
  65. /data/{test → compat}/views/foo.builder +0 -0
  66. /data/{test → compat}/views/foo.erb +0 -0
  67. /data/{test → compat}/views/foo.haml +0 -0
  68. /data/{test → compat}/views/foo.sass +0 -0
  69. /data/{test → compat}/views/foo_layout.erb +0 -0
  70. /data/{test → compat}/views/foo_layout.haml +0 -0
  71. /data/{test → compat}/views/layout_test/foo.builder +0 -0
  72. /data/{test → compat}/views/layout_test/foo.erb +0 -0
  73. /data/{test → compat}/views/layout_test/foo.haml +0 -0
  74. /data/{test → compat}/views/layout_test/foo.sass +0 -0
  75. /data/{test → compat}/views/layout_test/layout.builder +0 -0
  76. /data/{test → compat}/views/layout_test/layout.erb +0 -0
  77. /data/{test → compat}/views/layout_test/layout.haml +0 -0
  78. /data/{test → compat}/views/layout_test/layout.sass +0 -0
  79. /data/{test → compat}/views/no_layout/no_layout.builder +0 -0
  80. /data/{test → compat}/views/no_layout/no_layout.haml +0 -0
  81. /data/{images → lib/sinatra/images}/404.png +0 -0
  82. /data/{images → lib/sinatra/images}/500.png +0 -0
data/sinatra.gemspec CHANGED
@@ -3,70 +3,103 @@ Gem::Specification.new do |s|
3
3
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
4
4
 
5
5
  s.name = 'sinatra'
6
- s.version = '0.3.2'
7
- s.date = "2008-11-02"
6
+ s.version = '0.9.0.2'
7
+ s.date = '2009-01-18'
8
8
 
9
9
  s.description = "Classy web-development dressed in a DSL"
10
10
  s.summary = "Classy web-development dressed in a DSL"
11
11
 
12
12
  s.authors = ["Blake Mizerany"]
13
+ s.email = "sinatrarb@googlegroups.com"
13
14
 
14
15
  # = MANIFEST =
15
16
  s.files = %w[
16
- ChangeLog
17
+ AUTHORS
18
+ CHANGES
17
19
  LICENSE
18
20
  README.rdoc
19
21
  Rakefile
20
- images/404.png
21
- images/500.png
22
+ compat/app_test.rb
23
+ compat/application_test.rb
24
+ compat/builder_test.rb
25
+ compat/custom_error_test.rb
26
+ compat/erb_test.rb
27
+ compat/events_test.rb
28
+ compat/filter_test.rb
29
+ compat/haml_test.rb
30
+ compat/helper.rb
31
+ compat/mapped_error_test.rb
32
+ compat/pipeline_test.rb
33
+ compat/public/foo.xml
34
+ compat/sass_test.rb
35
+ compat/sessions_test.rb
36
+ compat/streaming_test.rb
37
+ compat/sym_params_test.rb
38
+ compat/template_test.rb
39
+ compat/use_in_file_templates_test.rb
40
+ compat/views/foo.builder
41
+ compat/views/foo.erb
42
+ compat/views/foo.haml
43
+ compat/views/foo.sass
44
+ compat/views/foo_layout.erb
45
+ compat/views/foo_layout.haml
46
+ compat/views/layout_test/foo.builder
47
+ compat/views/layout_test/foo.erb
48
+ compat/views/layout_test/foo.haml
49
+ compat/views/layout_test/foo.sass
50
+ compat/views/layout_test/layout.builder
51
+ compat/views/layout_test/layout.erb
52
+ compat/views/layout_test/layout.haml
53
+ compat/views/layout_test/layout.sass
54
+ compat/views/no_layout/no_layout.builder
55
+ compat/views/no_layout/no_layout.haml
22
56
  lib/sinatra.rb
23
- lib/sinatra/test/methods.rb
57
+ lib/sinatra/base.rb
58
+ lib/sinatra/compat.rb
59
+ lib/sinatra/images/404.png
60
+ lib/sinatra/images/500.png
61
+ lib/sinatra/main.rb
62
+ lib/sinatra/test.rb
63
+ lib/sinatra/test/bacon.rb
24
64
  lib/sinatra/test/rspec.rb
25
65
  lib/sinatra/test/spec.rb
26
66
  lib/sinatra/test/unit.rb
27
67
  sinatra.gemspec
28
- test/app_test.rb
29
- test/application_test.rb
68
+ test/base_test.rb
30
69
  test/builder_test.rb
31
- test/custom_error_test.rb
70
+ test/data/reload_app_file.rb
32
71
  test/erb_test.rb
33
- test/event_context_test.rb
34
- test/events_test.rb
35
72
  test/filter_test.rb
36
73
  test/haml_test.rb
37
74
  test/helper.rb
75
+ test/helpers_test.rb
38
76
  test/mapped_error_test.rb
39
- test/pipeline_test.rb
40
- test/public/foo.xml
77
+ test/middleware_test.rb
78
+ test/options_test.rb
79
+ test/reload_test.rb
80
+ test/request_test.rb
81
+ test/result_test.rb
82
+ test/routing_test.rb
41
83
  test/sass_test.rb
42
- test/sessions_test.rb
43
- test/streaming_test.rb
44
- test/sym_params_test.rb
45
- test/template_test.rb
46
- test/use_in_file_templates_test.rb
47
- test/views/foo.builder
48
- test/views/foo.erb
49
- test/views/foo.haml
50
- test/views/foo.sass
51
- test/views/foo_layout.erb
52
- test/views/foo_layout.haml
53
- test/views/layout_test/foo.builder
54
- test/views/layout_test/foo.erb
55
- test/views/layout_test/foo.haml
56
- test/views/layout_test/foo.sass
57
- test/views/layout_test/layout.builder
58
- test/views/layout_test/layout.erb
59
- test/views/layout_test/layout.haml
60
- test/views/layout_test/layout.sass
61
- test/views/no_layout/no_layout.builder
62
- test/views/no_layout/no_layout.haml
84
+ test/sinatra_test.rb
85
+ test/static_test.rb
86
+ test/templates_test.rb
87
+ test/views/hello.builder
88
+ test/views/hello.erb
89
+ test/views/hello.haml
90
+ test/views/hello.sass
91
+ test/views/hello.test
92
+ test/views/layout2.builder
93
+ test/views/layout2.erb
94
+ test/views/layout2.haml
95
+ test/views/layout2.test
63
96
  ]
64
97
  # = MANIFEST =
65
98
 
66
99
  s.test_files = s.files.select {|path| path =~ /^test\/.*_test.rb/}
67
100
 
68
101
  s.extra_rdoc_files = %w[README.rdoc LICENSE]
69
- s.add_dependency 'rack', '>= 0.4.0'
102
+ s.add_dependency 'rack', '>= 0.9.1'
70
103
 
71
104
  s.has_rdoc = true
72
105
  s.homepage = "http://sinatra.rubyforge.org"
data/test/base_test.rb ADDED
@@ -0,0 +1,68 @@
1
+ require File.dirname(__FILE__) + '/helper'
2
+
3
+ describe 'Sinatra::Base' do
4
+ it 'includes Rack::Utils' do
5
+ assert Sinatra::Base.included_modules.include?(Rack::Utils)
6
+ end
7
+
8
+ it 'can be used as a Rack application' do
9
+ mock_app {
10
+ get '/' do
11
+ 'Hello World'
12
+ end
13
+ }
14
+ assert @app.respond_to?(:call)
15
+
16
+ request = Rack::MockRequest.new(@app)
17
+ response = request.get('/')
18
+ assert response.ok?
19
+ assert_equal 'Hello World', response.body
20
+ end
21
+
22
+ it 'can be used as Rack middleware' do
23
+ app = lambda { |env| [200, {}, ['Goodbye World']] }
24
+ mock_middleware =
25
+ mock_app {
26
+ get '/' do
27
+ 'Hello World'
28
+ end
29
+ get '/goodbye' do
30
+ @app.call(request.env)
31
+ end
32
+ }
33
+ middleware = mock_middleware.new(app)
34
+ assert_same app, middleware.app
35
+
36
+ request = Rack::MockRequest.new(middleware)
37
+ response = request.get('/')
38
+ assert response.ok?
39
+ assert_equal 'Hello World', response.body
40
+
41
+ response = request.get('/goodbye')
42
+ assert response.ok?
43
+ assert_equal 'Goodbye World', response.body
44
+ end
45
+
46
+ it 'can take multiple definitions of a route' do
47
+ app = mock_app {
48
+ user_agent(/Foo/)
49
+ get '/foo' do
50
+ 'foo'
51
+ end
52
+
53
+ get '/foo' do
54
+ 'not foo'
55
+ end
56
+ }
57
+
58
+ request = Rack::MockRequest.new(app)
59
+ response = request.get('/foo', 'HTTP_USER_AGENT' => 'Foo')
60
+ assert response.ok?
61
+ assert_equal 'foo', response.body
62
+
63
+ request = Rack::MockRequest.new(app)
64
+ response = request.get('/foo')
65
+ assert response.ok?
66
+ assert_equal 'not foo', response.body
67
+ end
68
+ end
data/test/builder_test.rb CHANGED
@@ -1,101 +1,64 @@
1
1
  require File.dirname(__FILE__) + '/helper'
2
2
 
3
- context "Builder" do
4
-
5
- setup do
6
- Sinatra.application = nil
3
+ describe "Builder Templates" do
4
+ def builder_app(&block)
5
+ mock_app {
6
+ set :views, File.dirname(__FILE__) + '/views'
7
+ get '/', &block
8
+ }
9
+ get '/'
7
10
  end
8
11
 
9
- context "without layouts" do
10
-
11
- setup do
12
- Sinatra.application = nil
13
- end
14
-
15
- specify "should render" do
16
-
17
- get '/no_layout' do
18
- builder 'xml.instruct!'
19
- end
20
-
21
- get_it '/no_layout'
22
- should.be.ok
23
- body.should == %(<?xml version="1.0" encoding="UTF-8"?>\n)
24
-
25
- end
26
-
27
- specify "should render inline block" do
28
-
29
- get '/no_layout_and_inlined' do
30
- @name = "Frank & Mary"
31
- builder do |xml|
32
- xml.couple @name
33
- end
34
- end
35
-
36
- get_it '/no_layout_and_inlined'
37
- should.be.ok
38
- body.should == %(<couple>Frank &amp; Mary</couple>\n)
39
-
40
- end
41
-
12
+ it 'renders inline Builder strings' do
13
+ builder_app { builder 'xml.instruct!' }
14
+ assert ok?
15
+ assert_equal %{<?xml version="1.0" encoding="UTF-8"?>\n}, body
42
16
  end
43
17
 
44
-
45
-
46
- context "Templates (in general)" do
47
-
48
- setup do
49
- Sinatra.application = nil
50
- end
51
-
52
- specify "are read from files if Symbols" do
53
-
54
- get '/from_file' do
55
- @name = 'Blue'
56
- builder :foo, :views_directory => File.dirname(__FILE__) + "/views"
18
+ it 'renders inline blocks' do
19
+ builder_app {
20
+ @name = "Frank & Mary"
21
+ builder do |xml|
22
+ xml.couple @name
57
23
  end
24
+ }
25
+ assert ok?
26
+ assert_equal "<couple>Frank &amp; Mary</couple>\n", body
27
+ end
58
28
 
59
- get_it '/from_file'
60
- should.be.ok
61
- body.should.equal %(<exclaim>You rock Blue!</exclaim>\n)
62
-
63
- end
64
-
65
- specify "use layout.ext by default if available" do
66
-
67
- get '/' do
68
- builder :foo, :views_directory => File.dirname(__FILE__) + "/views/layout_test"
69
- end
70
-
71
- get_it '/'
72
- should.be.ok
73
- body.should.equal "<layout>\n<this>is foo!</this>\n</layout>\n"
74
-
75
- end
76
-
77
- specify "renders without layout" do
78
-
79
- get '/' do
80
- builder :no_layout, :views_directory => File.dirname(__FILE__) + "/views/no_layout"
81
- end
82
-
83
- get_it '/'
84
- should.be.ok
85
- body.should.equal "<foo>No Layout!</foo>\n"
86
-
87
- end
88
-
89
- specify "raises error if template not found" do
29
+ it 'renders .builder files in views path' do
30
+ builder_app {
31
+ @name = "Blue"
32
+ builder :hello
33
+ }
34
+ assert ok?
35
+ assert_equal %(<exclaim>You're my boy, Blue!</exclaim>\n), body
36
+ end
90
37
 
91
- get '/' do
92
- builder :not_found
38
+ it "renders with inline layouts" do
39
+ mock_app {
40
+ layout do
41
+ %(xml.layout { xml << yield })
93
42
  end
43
+ get('/') { builder %(xml.em 'Hello World') }
44
+ }
45
+ get '/'
46
+ assert ok?
47
+ assert_equal "<layout>\n<em>Hello World</em>\n</layout>\n", body
48
+ end
94
49
 
95
- lambda { get_it '/' }.should.raise(Errno::ENOENT)
96
-
97
- end
98
-
50
+ it "renders with file layouts" do
51
+ builder_app {
52
+ builder %(xml.em 'Hello World'), :layout => :layout2
53
+ }
54
+ assert ok?
55
+ assert_equal "<layout>\n<em>Hello World</em>\n</layout>\n", body
99
56
  end
100
57
 
58
+ it "raises error if template not found" do
59
+ mock_app {
60
+ get('/') { builder :no_such_template }
61
+ }
62
+ assert_raise(Errno::ENOENT) { get('/') }
63
+ end
101
64
  end
@@ -0,0 +1,3 @@
1
+ $reload_count += 1
2
+
3
+ $reload_app.get('/') { 'Hello from reload file' }
data/test/erb_test.rb CHANGED
@@ -1,136 +1,50 @@
1
1
  require File.dirname(__FILE__) + '/helper'
2
2
 
3
- context "Erb" do
4
-
5
- setup do
6
- Sinatra.application = nil
3
+ describe "ERB Templates" do
4
+ def erb_app(&block)
5
+ mock_app {
6
+ set :views, File.dirname(__FILE__) + '/views'
7
+ get '/', &block
8
+ }
9
+ get '/'
7
10
  end
8
11
 
9
- context "without layouts" do
10
-
11
- setup do
12
- Sinatra.application = nil
13
- end
14
-
15
- specify "should render" do
16
-
17
- get '/no_layout' do
18
- erb '<%= 1 + 1 %>'
19
- end
20
-
21
- get_it '/no_layout'
22
- should.be.ok
23
- body.should == '2'
24
-
25
- end
26
-
27
- specify "should take an options hash with :locals set with a string" do
28
- get '/locals' do
29
- erb '<%= foo %>', :locals => {:foo => "Bar"}
30
- end
31
-
32
- get_it '/locals'
33
- should.be.ok
34
- body.should == 'Bar'
35
- end
36
-
37
- specify "should take an options hash with :locals set with a complex object" do
38
- get '/locals-complex' do
39
- erb '<%= foo[0] %>', :locals => {:foo => ["foo", "bar", "baz"]}
40
- end
41
-
42
- get_it '/locals-complex'
43
- should.be.ok
44
- body.should == 'foo'
45
- end
12
+ it 'renders inline ERB strings' do
13
+ erb_app { erb '<%= 1 + 1 %>' }
14
+ assert ok?
15
+ assert_equal '2', body
46
16
  end
47
17
 
48
- context "with layouts" do
49
-
50
- setup do
51
- Sinatra.application = nil
52
- end
53
-
54
- specify "can be inline" do
55
-
56
- layout do
57
- %Q{This is <%= yield %>!}
58
- end
59
-
60
- get '/lay' do
61
- erb 'Blake'
62
- end
63
-
64
- get_it '/lay'
65
- should.be.ok
66
- body.should.equal 'This is Blake!'
67
-
68
- end
69
-
70
- specify "can use named layouts" do
71
-
72
- layout :pretty do
73
- %Q{<h1><%= yield %></h1>}
74
- end
75
-
76
- get '/pretty' do
77
- erb 'Foo', :layout => :pretty
78
- end
79
-
80
- get '/not_pretty' do
81
- erb 'Bar'
82
- end
83
-
84
- get_it '/pretty'
85
- body.should.equal '<h1>Foo</h1>'
86
-
87
- get_it '/not_pretty'
88
- body.should.equal 'Bar'
89
-
90
- end
91
-
92
- specify "can be read from a file if they're not inlined" do
93
-
94
- get '/foo' do
95
- @title = 'Welcome to the Hello Program'
96
- erb 'Blake', :layout => :foo_layout,
97
- :views_directory => File.dirname(__FILE__) + "/views"
98
- end
99
-
100
- get_it '/foo'
101
- body.should.equal "Welcome to the Hello Program\nHi Blake\n"
102
-
103
- end
104
-
18
+ it 'renders .erb files in views path' do
19
+ erb_app { erb :hello }
20
+ assert ok?
21
+ assert_equal "Hello World\n", body
105
22
  end
106
23
 
107
- context "Templates (in general)" do
108
-
109
- specify "are read from files if Symbols" do
110
-
111
- get '/from_file' do
112
- @name = 'Alena'
113
- erb :foo, :views_directory => File.dirname(__FILE__) + "/views"
114
- end
115
-
116
- get_it '/from_file'
117
-
118
- body.should.equal 'You rock Alena!'
119
-
120
- end
121
-
122
- specify "use layout.ext by default if available" do
123
-
124
- get '/layout_from_file' do
125
- erb :foo, :views_directory => File.dirname(__FILE__) + "/views/layout_test"
126
- end
127
-
128
- get_it '/layout_from_file'
129
- should.be.ok
130
- body.should.equal "x This is foo! x \n"
131
-
132
- end
24
+ it 'takes a :locals option' do
25
+ erb_app {
26
+ locals = {:foo => 'Bar'}
27
+ erb '<%= foo %>', :locals => locals
28
+ }
29
+ assert ok?
30
+ assert_equal 'Bar', body
31
+ end
133
32
 
33
+ it "renders with inline layouts" do
34
+ mock_app {
35
+ layout { 'THIS. IS. <%= yield.upcase %>!' }
36
+ get('/') { erb 'Sparta' }
37
+ }
38
+ get '/'
39
+ assert ok?
40
+ assert_equal 'THIS. IS. SPARTA!', body
134
41
  end
135
42
 
43
+ it "renders with file layouts" do
44
+ erb_app {
45
+ erb 'Hello World', :layout => :layout2
46
+ }
47
+ assert ok?
48
+ assert_equal "ERB Layout!\nHello World\n", body
49
+ end
136
50
  end
data/test/filter_test.rb CHANGED
@@ -1,30 +1,75 @@
1
1
  require File.dirname(__FILE__) + '/helper'
2
2
 
3
- context "before filters" do
3
+ describe "Filters" do
4
+ it "executes filters in the order defined" do
5
+ count = 0
6
+ mock_app do
7
+ get('/') { 'Hello World' }
8
+ before {
9
+ assert_equal 0, count
10
+ count = 1
11
+ }
12
+ before {
13
+ assert_equal 1, count
14
+ count = 2
15
+ }
16
+ end
4
17
 
5
- setup do
6
- Sinatra.application = nil
7
- @app = Sinatra.application
18
+ get '/'
19
+ assert ok?
20
+ assert_equal 2, count
21
+ assert_equal 'Hello World', body
8
22
  end
9
23
 
10
- specify "should be executed in the order defined" do
11
- invoked = 0x0
12
- @app.before { invoked = 0x01 }
13
- @app.before { invoked |= 0x02 }
14
- @app.get('/') { 'Hello World' }
15
- get_it '/'
16
- should.be.ok
17
- body.should.be == 'Hello World'
18
- invoked.should.be == 0x03
24
+ it "allows filters to modify the request" do
25
+ mock_app {
26
+ get('/foo') { 'foo' }
27
+ get('/bar') { 'bar' }
28
+ before { request.path_info = '/bar' }
29
+ }
30
+
31
+ get '/foo'
32
+ assert ok?
33
+ assert_equal 'bar', body
19
34
  end
20
35
 
21
- specify "should be capable of modifying the request" do
22
- @app.get('/foo') { 'foo' }
23
- @app.get('/bar') { 'bar' }
24
- @app.before { request.path_info = '/bar' }
25
- get_it '/foo'
26
- should.be.ok
27
- body.should.be == 'bar'
36
+ it "can modify instance variables available to routes" do
37
+ mock_app {
38
+ before { @foo = 'bar' }
39
+ get('/foo') { @foo }
40
+ }
41
+
42
+ get '/foo'
43
+ assert ok?
44
+ assert_equal 'bar', body
28
45
  end
29
46
 
47
+ it "allows redirects in filters" do
48
+ mock_app {
49
+ before { redirect '/bar' }
50
+ get('/foo') do
51
+ fail 'before block should have halted processing'
52
+ 'ORLY?!'
53
+ end
54
+ }
55
+
56
+ get '/foo'
57
+ assert redirect?
58
+ assert_equal '/bar', response['Location']
59
+ assert_equal '', body
60
+ end
61
+
62
+ it "does not modify the response with its return value" do
63
+ mock_app {
64
+ before { 'Hello World!' }
65
+ get '/foo' do
66
+ assert_equal [], response.body
67
+ 'cool'
68
+ end
69
+ }
70
+
71
+ get '/foo'
72
+ assert ok?
73
+ assert_equal 'cool', body
74
+ end
30
75
  end