GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Rubygem
Description: Resource-oriented open source Ruby framework for Web apps.
Homepage: http://rubywaves.com/
Clone URL: git://github.com/dyoder/waves.git
failing test case for handle
automatthew (author)
Tue Apr 22 07:15:31 -0700 2008
commit  7691a2d88ae6ceec4881e93f0fdb166abe843be2
tree    fa246e2cba520112e9fe358355a1c4d9f13e1e11
parent  7b19d7046fce53e9d3eaa72d8a3e923f1a51010b
...
1
2
3
4
 
5
6
7
8
9
10
 
11
12
13
14
15
 
 
 
 
 
 
 
16
17
...
1
2
3
 
4
5
6
7
8
9
 
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
0
@@ -1,16 +1,23 @@
0
 # require 'test_helper' because RubyMate needs help
0
 require File.join(File.dirname(__FILE__), "..", "helpers")
0
 
0
-specification "A developer can handle exceptions using some damn thing" do
0
+specification "A developer can register exception handlers" do
0
     
0
   before do
0
     mapping.clear
0
   end
0
 
0
- specify 'Map the path of a GET request to a lambda.' do
0
+ specify 'The minimal 404 handler in SimpleErrors' do
0
     r = get('/')
0
     r.status.should == 404
0
     r.body.should.be.empty
0
   end
0
   
0
+ specify "A custom 404 handler should override the minimal" do
0
+ handle(Waves::Dispatchers::NotFoundError) { response.status = 404; response.body = "gone baby gone"}
0
+ r = get('/')
0
+ r.status.should == 404
0
+ r.body.should == "gone baby gone"
0
+ end
0
+
0
 end
0
\ No newline at end of file

Comments

    No one has commented yet.