roda 2.2.0 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +34 -0
  3. data/Rakefile +22 -46
  4. data/doc/release_notes/2.3.0.txt +109 -0
  5. data/lib/roda/plugins/assets.rb +2 -1
  6. data/lib/roda/plugins/caching.rb +1 -1
  7. data/lib/roda/plugins/chunked.rb +1 -1
  8. data/lib/roda/plugins/error_email.rb +1 -1
  9. data/lib/roda/plugins/head.rb +6 -0
  10. data/lib/roda/plugins/heartbeat.rb +40 -0
  11. data/lib/roda/plugins/json.rb +23 -3
  12. data/lib/roda/plugins/json_parser.rb +72 -0
  13. data/lib/roda/plugins/mailer.rb +22 -5
  14. data/lib/roda/plugins/named_templates.rb +2 -2
  15. data/lib/roda/plugins/path_rewriter.rb +82 -0
  16. data/lib/roda/plugins/precompile_templates.rb +87 -0
  17. data/lib/roda/plugins/render.rb +111 -43
  18. data/lib/roda/plugins/render_each.rb +1 -1
  19. data/lib/roda/plugins/shared_vars.rb +1 -1
  20. data/lib/roda/plugins/view_options.rb +28 -3
  21. data/lib/roda/version.rb +1 -1
  22. data/spec/composition_spec.rb +3 -3
  23. data/spec/env_spec.rb +1 -1
  24. data/spec/freeze_spec.rb +6 -6
  25. data/spec/integration_spec.rb +16 -15
  26. data/spec/matchers_spec.rb +110 -110
  27. data/spec/opts_spec.rb +8 -8
  28. data/spec/plugin/_erubis_escaping_spec.rb +34 -3
  29. data/spec/plugin/all_verbs_spec.rb +8 -8
  30. data/spec/plugin/assets_spec.rb +164 -150
  31. data/spec/plugin/backtracking_array_spec.rb +18 -18
  32. data/spec/plugin/caching_spec.rb +70 -70
  33. data/spec/plugin/chunked_spec.rb +38 -38
  34. data/spec/plugin/class_level_routing_spec.rb +78 -78
  35. data/spec/plugin/content_for_spec.rb +2 -2
  36. data/spec/plugin/cookies_spec.rb +4 -4
  37. data/spec/plugin/csrf_spec.rb +8 -8
  38. data/spec/plugin/default_headers_spec.rb +6 -6
  39. data/spec/plugin/delay_build_spec.rb +7 -6
  40. data/spec/plugin/delegate_spec.rb +2 -2
  41. data/spec/plugin/delete_empty_headers_spec.rb +2 -2
  42. data/spec/plugin/drop_body_spec.rb +6 -6
  43. data/spec/plugin/empty_root_spec.rb +3 -3
  44. data/spec/plugin/environments_spec.rb +7 -7
  45. data/spec/plugin/error_email_spec.rb +23 -23
  46. data/spec/plugin/error_handler_spec.rb +14 -14
  47. data/spec/plugin/flash_spec.rb +30 -29
  48. data/spec/plugin/h_spec.rb +1 -1
  49. data/spec/plugin/halt_spec.rb +16 -16
  50. data/spec/plugin/hash_matcher_spec.rb +5 -5
  51. data/spec/plugin/head_spec.rb +10 -10
  52. data/spec/plugin/header_matchers_spec.rb +13 -13
  53. data/spec/plugin/heartbeat_spec.rb +74 -0
  54. data/spec/plugin/hooks_spec.rb +20 -20
  55. data/spec/plugin/indifferent_params_spec.rb +1 -1
  56. data/spec/plugin/json_parser_spec.rb +72 -0
  57. data/spec/plugin/json_spec.rb +22 -9
  58. data/spec/plugin/mailer_spec.rb +72 -58
  59. data/spec/plugin/match_affix_spec.rb +2 -2
  60. data/spec/plugin/middleware_spec.rb +7 -7
  61. data/spec/plugin/module_include_spec.rb +4 -4
  62. data/spec/plugin/multi_route_spec.rb +66 -66
  63. data/spec/plugin/multi_run_spec.rb +21 -21
  64. data/spec/plugin/named_templates_spec.rb +6 -6
  65. data/spec/plugin/not_allowed_spec.rb +17 -17
  66. data/spec/plugin/not_found_spec.rb +14 -14
  67. data/spec/plugin/padrino_render_spec.rb +2 -2
  68. data/spec/plugin/param_matchers_spec.rb +6 -6
  69. data/spec/plugin/partials_spec.rb +3 -3
  70. data/spec/plugin/pass_spec.rb +7 -7
  71. data/spec/plugin/path_matchers_spec.rb +6 -6
  72. data/spec/plugin/path_rewriter_spec.rb +37 -0
  73. data/spec/plugin/path_spec.rb +41 -40
  74. data/spec/plugin/per_thread_caching_spec.rb +6 -6
  75. data/spec/plugin/precompile_templates_spec.rb +74 -0
  76. data/spec/plugin/render_each_spec.rb +4 -4
  77. data/spec/plugin/render_spec.rb +179 -76
  78. data/spec/plugin/shared_vars_spec.rb +4 -4
  79. data/spec/plugin/sinatra_helpers_spec.rb +121 -121
  80. data/spec/plugin/slash_path_empty_spec.rb +10 -10
  81. data/spec/plugin/static_spec.rb +4 -4
  82. data/spec/plugin/streaming_spec.rb +11 -11
  83. data/spec/plugin/symbol_matchers_spec.rb +24 -24
  84. data/spec/plugin/symbol_views_spec.rb +3 -3
  85. data/spec/plugin/view_options_spec.rb +10 -10
  86. data/spec/plugin_spec.rb +2 -2
  87. data/spec/redirect_spec.rb +10 -10
  88. data/spec/request_spec.rb +8 -8
  89. data/spec/response_spec.rb +23 -23
  90. data/spec/session_spec.rb +4 -4
  91. data/spec/spec_helper.rb +5 -19
  92. data/spec/version_spec.rb +4 -4
  93. data/spec/views/iv.erb +1 -0
  94. metadata +16 -5
@@ -1,7 +1,7 @@
1
1
  require File.expand_path("spec_helper", File.dirname(File.dirname(__FILE__)))
2
2
 
3
3
  describe "module_include plugin" do
4
- it "should include given module in request or response class" do
4
+ it "must_include given module in request or response class" do
5
5
  app(:bare) do
6
6
  plugin :module_include
7
7
  request_module(Module.new{def h; halt response.finish end})
@@ -12,7 +12,7 @@ describe "module_include plugin" do
12
12
  end
13
13
  end
14
14
 
15
- req.should == [1, {}, []]
15
+ req.must_equal [1, {}, []]
16
16
  end
17
17
 
18
18
  it "should accept blocks and turn them into modules" do
@@ -26,7 +26,7 @@ describe "module_include plugin" do
26
26
  end
27
27
  end
28
28
 
29
- req.should == [1, {}, []]
29
+ req.must_equal [1, {}, []]
30
30
  end
31
31
 
32
32
  it "should work if called multiple times with a block" do
@@ -42,7 +42,7 @@ describe "module_include plugin" do
42
42
  end
43
43
  end
44
44
 
45
- req.should == [1, {}, []]
45
+ req.must_equal [1, {}, []]
46
46
  end
47
47
 
48
48
  end
@@ -66,72 +66,72 @@ describe "multi_route plugin" do
66
66
  end
67
67
 
68
68
  it "adds named routing support" do
69
- body.should == 'get'
70
- body('REQUEST_METHOD'=>'POST').should == 'post'
71
- body('/a').should == 'geta'
72
- body('/a', 'REQUEST_METHOD'=>'POST').should == 'posta'
73
- body('/b').should == 'getb'
74
- body('/b', 'REQUEST_METHOD'=>'POST').should == 'postb'
75
- status('/c').should == 404
76
- status('/c', 'REQUEST_METHOD'=>'POST').should == 404
69
+ body.must_equal 'get'
70
+ body('REQUEST_METHOD'=>'POST').must_equal 'post'
71
+ body('/a').must_equal 'geta'
72
+ body('/a', 'REQUEST_METHOD'=>'POST').must_equal 'posta'
73
+ body('/b').must_equal 'getb'
74
+ body('/b', 'REQUEST_METHOD'=>'POST').must_equal 'postb'
75
+ status('/c').must_equal 404
76
+ status('/c', 'REQUEST_METHOD'=>'POST').must_equal 404
77
77
  end
78
78
 
79
79
  it "works when freezing the app" do
80
80
  app.freeze
81
- body.should == 'get'
82
- body('REQUEST_METHOD'=>'POST').should == 'post'
83
- body('/a').should == 'geta'
84
- body('/a', 'REQUEST_METHOD'=>'POST').should == 'posta'
85
- body('/b').should == 'getb'
86
- body('/b', 'REQUEST_METHOD'=>'POST').should == 'postb'
87
- status('/c').should == 404
88
- status('/c', 'REQUEST_METHOD'=>'POST').should == 404
89
-
90
- proc{app.route("foo"){}}.should raise_error
81
+ body.must_equal 'get'
82
+ body('REQUEST_METHOD'=>'POST').must_equal 'post'
83
+ body('/a').must_equal 'geta'
84
+ body('/a', 'REQUEST_METHOD'=>'POST').must_equal 'posta'
85
+ body('/b').must_equal 'getb'
86
+ body('/b', 'REQUEST_METHOD'=>'POST').must_equal 'postb'
87
+ status('/c').must_equal 404
88
+ status('/c', 'REQUEST_METHOD'=>'POST').must_equal 404
89
+
90
+ proc{app.route("foo"){}}.must_raise FrozenError
91
91
  end
92
92
 
93
93
  it "uses multi_route to dispatch to any named route" do
94
- status('/foo').should == 404
95
- body('/foo/get/').should == 'get'
96
- body('/foo/get/a').should == 'geta'
97
- body('/foo/post/').should == 'post'
98
- body('/foo/post/a').should == 'posta'
99
- body('/foo/post/b').should == 'foo'
94
+ status('/foo').must_equal 404
95
+ body('/foo/get/').must_equal 'get'
96
+ body('/foo/get/a').must_equal 'geta'
97
+ body('/foo/post/').must_equal 'post'
98
+ body('/foo/post/a').must_equal 'posta'
99
+ body('/foo/post/b').must_equal 'foo'
100
100
  end
101
101
 
102
102
  it "does not have multi_route match non-String named routes" do
103
- body('/foo/p').should == 'p'
104
- status('/foo/p/2').should == 404
103
+ body('/foo/p').must_equal 'p'
104
+ status('/foo/p/2').must_equal 404
105
105
  end
106
106
 
107
107
  it "has multi_route pick up routes newly added" do
108
- body('/foo/get/').should == 'get'
109
- status('/foo/delete').should == 404
108
+ body('/foo/get/').must_equal 'get'
109
+ status('/foo/delete').must_equal 404
110
110
  app.route('delete'){|r| r.on{'delete'}}
111
- body('/foo/delete').should == 'delete'
111
+ body('/foo/delete').must_equal 'delete'
112
112
  end
113
113
 
114
114
  it "makes multi_route match longest route if multiple routes have the same prefix" do
115
115
  app.route("post/a"){|r| r.on{"pa2"}}
116
116
  app.route("get/a"){|r| r.on{"ga2"}}
117
- status('/foo').should == 404
118
- body('/foo/get/').should == 'get'
119
- body('/foo/get/a').should == 'ga2'
120
- body('/foo/post/').should == 'post'
121
- body('/foo/post/a').should == 'pa2'
122
- body('/foo/post/b').should == 'foo'
117
+ status('/foo').must_equal 404
118
+ body('/foo/get/').must_equal 'get'
119
+ body('/foo/get/a').must_equal 'ga2'
120
+ body('/foo/post/').must_equal 'post'
121
+ body('/foo/post/a').must_equal 'pa2'
122
+ body('/foo/post/b').must_equal 'foo'
123
123
  end
124
124
 
125
125
  it "handles loading the plugin multiple times correctly" do
126
126
  app.plugin :multi_route
127
- body.should == 'get'
128
- body('REQUEST_METHOD'=>'POST').should == 'post'
129
- body('/a').should == 'geta'
130
- body('/a', 'REQUEST_METHOD'=>'POST').should == 'posta'
131
- body('/b').should == 'getb'
132
- body('/b', 'REQUEST_METHOD'=>'POST').should == 'postb'
133
- status('/c').should == 404
134
- status('/c', 'REQUEST_METHOD'=>'POST').should == 404
127
+ body.must_equal 'get'
128
+ body('REQUEST_METHOD'=>'POST').must_equal 'post'
129
+ body('/a').must_equal 'geta'
130
+ body('/a', 'REQUEST_METHOD'=>'POST').must_equal 'posta'
131
+ body('/b').must_equal 'getb'
132
+ body('/b', 'REQUEST_METHOD'=>'POST').must_equal 'postb'
133
+ status('/c').must_equal 404
134
+ status('/c', 'REQUEST_METHOD'=>'POST').must_equal 404
135
135
  end
136
136
 
137
137
  it "handles subclassing correctly" do
@@ -153,20 +153,20 @@ describe "multi_route plugin" do
153
153
  end
154
154
  end
155
155
 
156
- body.should == 'post'
157
- body('REQUEST_METHOD'=>'POST').should == 'get'
158
- body('/a').should == 'posta'
159
- body('/a', 'REQUEST_METHOD'=>'POST').should == 'geta'
160
- body('/b').should == '1b'
161
- body('/b', 'REQUEST_METHOD'=>'POST').should == '2b'
162
- status('/c').should == 404
163
- status('/c', 'REQUEST_METHOD'=>'POST').should == 404
156
+ body.must_equal 'post'
157
+ body('REQUEST_METHOD'=>'POST').must_equal 'get'
158
+ body('/a').must_equal 'posta'
159
+ body('/a', 'REQUEST_METHOD'=>'POST').must_equal 'geta'
160
+ body('/b').must_equal '1b'
161
+ body('/b', 'REQUEST_METHOD'=>'POST').must_equal '2b'
162
+ status('/c').must_equal 404
163
+ status('/c', 'REQUEST_METHOD'=>'POST').must_equal 404
164
164
  end
165
165
 
166
166
  it "uses the named route return value in multi_route if no block is given" do
167
167
  app.route{|r| r.multi_route}
168
- body('/get').should == 'getd'
169
- body('/post').should == 'postd'
168
+ body('/get').must_equal 'getd'
169
+ body('/post').must_equal 'postd'
170
170
  end
171
171
  end
172
172
 
@@ -176,7 +176,7 @@ describe "multi_route plugin" do
176
176
  r.multi_route
177
177
  'a'
178
178
  end
179
- body.should == 'a'
179
+ body.must_equal 'a'
180
180
  end
181
181
  end
182
182
 
@@ -223,12 +223,12 @@ describe "multi_route plugin" do
223
223
  r.on("bar"){r.route("bar")}
224
224
  end
225
225
 
226
- body('/foo').should == 'f'
227
- body('/foo/foo').should == 'fff'
228
- body('/foo/bar').should == 'ffb'
229
- body('/bar').should == 'b'
230
- body('/bar/foo').should == 'bbf'
231
- body('/bar/bar').should == 'bbb'
226
+ body('/foo').must_equal 'f'
227
+ body('/foo/foo').must_equal 'fff'
228
+ body('/foo/bar').must_equal 'ffb'
229
+ body('/bar').must_equal 'b'
230
+ body('/bar/foo').must_equal 'bbf'
231
+ body('/bar/bar').must_equal 'bbb'
232
232
  end
233
233
 
234
234
  it "handles namespaces in r.multi_route" do
@@ -248,11 +248,11 @@ describe "multi_route plugin" do
248
248
  r.multi_route
249
249
  end
250
250
 
251
- body('/foo').should == 'f'
252
- body('/foo/foo').should == 'fff'
253
- body('/foo/bar').should == 'ffb'
254
- body('/bar').should == 'b'
255
- body('/bar/foo').should == 'bbf'
256
- body('/bar/bar').should == 'bbb'
251
+ body('/foo').must_equal 'f'
252
+ body('/foo/foo').must_equal 'fff'
253
+ body('/foo/bar').must_equal 'ffb'
254
+ body('/bar').must_equal 'b'
255
+ body('/bar/foo').must_equal 'bbf'
256
+ body('/bar/bar').must_equal 'bbb'
257
257
  end
258
258
  end
@@ -9,24 +9,24 @@ describe "multi_run plugin" do
9
9
 
10
10
  app.run "a", Class.new(Roda).class_eval{route{"a1"}; app}
11
11
 
12
- body("/a").should == 'a1'
13
- body("/b").should == 'c'
14
- body("/b/a").should == 'c'
15
- body.should == 'c'
12
+ body("/a").must_equal 'a1'
13
+ body("/b").must_equal 'c'
14
+ body("/b/a").must_equal 'c'
15
+ body.must_equal 'c'
16
16
 
17
17
  app.run "b", Class.new(Roda).class_eval{route{"b1"}; app}
18
18
 
19
- body("/a").should == 'a1'
20
- body("/b").should == 'b1'
21
- body("/b/a").should == 'b1'
22
- body.should == 'c'
19
+ body("/a").must_equal 'a1'
20
+ body("/b").must_equal 'b1'
21
+ body("/b/a").must_equal 'b1'
22
+ body.must_equal 'c'
23
23
 
24
24
  app.run "b/a", Class.new(Roda).class_eval{route{"b2"}; app}
25
25
 
26
- body("/a").should == 'a1'
27
- body("/b").should == 'b1'
28
- body("/b/a").should == 'b2'
29
- body.should == 'c'
26
+ body("/a").must_equal 'a1'
27
+ body("/b").must_equal 'b1'
28
+ body("/b/a").must_equal 'b2'
29
+ body.must_equal 'c'
30
30
  end
31
31
 
32
32
  it "works when freezing the app" do
@@ -40,12 +40,12 @@ describe "multi_run plugin" do
40
40
  app.run "b/a", Class.new(Roda).class_eval{route{"b2"}; app}
41
41
  app.freeze
42
42
 
43
- body("/a").should == 'a1'
44
- body("/b").should == 'b1'
45
- body("/b/a").should == 'b2'
46
- body.should == 'c'
43
+ body("/a").must_equal 'a1'
44
+ body("/b").must_equal 'b1'
45
+ body("/b/a").must_equal 'b2'
46
+ body.must_equal 'c'
47
47
 
48
- proc{app.run "a", Class.new(Roda).class_eval{route{"a1"}; app}}.should raise_error
48
+ proc{app.run "a", Class.new(Roda).class_eval{route{"a1"}; app}}.must_raise FrozenError
49
49
  end
50
50
 
51
51
  it "works when subclassing" do
@@ -55,7 +55,7 @@ describe "multi_run plugin" do
55
55
  end
56
56
 
57
57
  app.run "a", Class.new(Roda).class_eval{route{"a1"}; app}
58
- body("/a").should == 'a1'
58
+ body("/a").must_equal 'a1'
59
59
 
60
60
  a = app
61
61
  @app = Class.new(a)
@@ -63,10 +63,10 @@ describe "multi_run plugin" do
63
63
  a.run "b", Class.new(Roda).class_eval{route{"b2"}; app}
64
64
  app.run "b", Class.new(Roda).class_eval{route{"b1"}; app}
65
65
 
66
- body("/a").should == 'a1'
67
- body("/b").should == 'b1'
66
+ body("/a").must_equal 'a1'
67
+ body("/b").must_equal 'b1'
68
68
 
69
69
  @app = a
70
- body("/b").should == 'b2'
70
+ body("/b").must_equal 'b2'
71
71
  end
72
72
  end
@@ -25,9 +25,9 @@ describe "named_templates plugin" do
25
25
  end
26
26
  end
27
27
 
28
- body.should == 'bar13-foo12-baz'
28
+ body.must_equal 'bar13-foo12-baz'
29
29
  @app = Class.new(@app)
30
- body.should == 'bar13-foo12-baz'
30
+ body.must_equal 'bar13-foo12-baz'
31
31
  end
32
32
 
33
33
  it "works when freezing the app" do
@@ -50,9 +50,9 @@ describe "named_templates plugin" do
50
50
  end
51
51
 
52
52
  app.freeze
53
- body.should == 'bar13-foo12-baz'
53
+ body.must_equal 'bar13-foo12-baz'
54
54
 
55
- proc{app.template(:b){"a"}}.should raise_error
55
+ proc{app.template(:b){"a"}}.must_raise FrozenError
56
56
  end
57
57
 
58
58
  it "works with the view_subdirs plugin" do
@@ -89,8 +89,8 @@ describe "named_templates plugin" do
89
89
  end
90
90
  end
91
91
 
92
- body('/foo').should == 'foo13-foobar12-baz'
93
- body('/bar').should == 'bar43-barfoo42-baz'
92
+ body('/foo').must_equal 'foo13-foobar12-baz'
93
+ body('/bar').must_equal 'bar43-barfoo42-baz'
94
94
  end
95
95
  end
96
96
  end
@@ -40,27 +40,27 @@ describe "not_allowed plugin" do
40
40
  end
41
41
  end
42
42
 
43
- body.should == 'a'
44
- status('REQUEST_METHOD'=>'POST').should == 405
45
- header('Allow', 'REQUEST_METHOD'=>'POST').should == 'GET'
43
+ body.must_equal 'a'
44
+ status('REQUEST_METHOD'=>'POST').must_equal 405
45
+ header('Allow', 'REQUEST_METHOD'=>'POST').must_equal 'GET'
46
46
 
47
- body('/b').should == 'b'
48
- status('/b', 'REQUEST_METHOD'=>'POST').should == 404
47
+ body('/b').must_equal 'b'
48
+ status('/b', 'REQUEST_METHOD'=>'POST').must_equal 404
49
49
 
50
- body('/d').should == 'd'
51
- status('/d', 'REQUEST_METHOD'=>'POST').should == 404
50
+ body('/d').must_equal 'd'
51
+ status('/d', 'REQUEST_METHOD'=>'POST').must_equal 404
52
52
 
53
- body('/e').should == 'e'
54
- status('/e', 'REQUEST_METHOD'=>'POST').should == 404
53
+ body('/e').must_equal 'e'
54
+ status('/e', 'REQUEST_METHOD'=>'POST').must_equal 404
55
55
 
56
- body('/q').should == 'q'
57
- status('/q', 'REQUEST_METHOD'=>'POST').should == 405
56
+ body('/q').must_equal 'q'
57
+ status('/q', 'REQUEST_METHOD'=>'POST').must_equal 405
58
58
 
59
- body('/c').should == 'cg'
60
- body('/c').should == 'cg'
61
- body('/c', 'REQUEST_METHOD'=>'POST').should == 'cp'
62
- body('/c', 'REQUEST_METHOD'=>'PATCH').should == 'c'
63
- status('/c', 'REQUEST_METHOD'=>'PATCH').should == 405
64
- header('Allow', '/c', 'REQUEST_METHOD'=>'PATCH').should == 'GET, POST'
59
+ body('/c').must_equal 'cg'
60
+ body('/c').must_equal 'cg'
61
+ body('/c', 'REQUEST_METHOD'=>'POST').must_equal 'cp'
62
+ body('/c', 'REQUEST_METHOD'=>'PATCH').must_equal 'c'
63
+ status('/c', 'REQUEST_METHOD'=>'PATCH').must_equal 405
64
+ header('Allow', '/c', 'REQUEST_METHOD'=>'PATCH').must_equal 'GET, POST'
65
65
  end
66
66
  end
@@ -16,10 +16,10 @@ describe "not_found plugin" do
16
16
  end
17
17
  end
18
18
 
19
- body.should == 'not found'
20
- status.should == 404
21
- body("/a").should == 'found'
22
- status("/a").should == 200
19
+ body.must_equal 'not found'
20
+ status.must_equal 404
21
+ body("/a").must_equal 'found'
22
+ status("/a").must_equal 200
23
23
  end
24
24
 
25
25
  it "allows overriding status inside not_found" do
@@ -35,7 +35,7 @@ describe "not_found plugin" do
35
35
  end
36
36
  end
37
37
 
38
- status.should == 403
38
+ status.must_equal 403
39
39
  end
40
40
 
41
41
  it "calculates correct Content-Length" do
@@ -47,7 +47,7 @@ describe "not_found plugin" do
47
47
  route{}
48
48
  end
49
49
 
50
- header('Content-Length').should == "1"
50
+ header('Content-Length').must_equal "1"
51
51
  end
52
52
 
53
53
  it "clears existing headers" do
@@ -63,8 +63,8 @@ describe "not_found plugin" do
63
63
  end
64
64
  end
65
65
 
66
- header('Content-Type').should == 'text/html'
67
- header('Foo').should == nil
66
+ header('Content-Type').must_equal 'text/html'
67
+ header('Foo').must_equal nil
68
68
  end
69
69
 
70
70
  it "does not modify behavior if not_found is not called" do
@@ -74,8 +74,8 @@ describe "not_found plugin" do
74
74
  end
75
75
  end
76
76
 
77
- body.should == ''
78
- body("/a").should == 'found'
77
+ body.must_equal ''
78
+ body("/a").must_equal 'found'
79
79
  end
80
80
 
81
81
  it "can set not_found via the plugin block" do
@@ -91,8 +91,8 @@ describe "not_found plugin" do
91
91
  end
92
92
  end
93
93
 
94
- body.should == 'not found'
95
- body("/a").should == 'found'
94
+ body.must_equal 'not found'
95
+ body("/a").must_equal 'found'
96
96
  end
97
97
 
98
98
  it "does not modify behavior if body is not an array" do
@@ -108,7 +108,7 @@ describe "not_found plugin" do
108
108
  end
109
109
  end
110
110
 
111
- body.should == ''
111
+ body.must_equal ''
112
112
  end
113
113
 
114
114
  it "does not modify behavior if body is not an empty array" do
@@ -123,6 +123,6 @@ describe "not_found plugin" do
123
123
  end
124
124
  end
125
125
 
126
- body.should == 'a'
126
+ body.must_equal 'a'
127
127
  end
128
128
  end