spec/hara_spec.rb in hara-0.0.2 vs spec/hara_spec.rb in hara-0.1.0
- old
+ new
@@ -7,6 +7,16 @@
end
it 'Hara.env should be development' do
Hara.env.should == :development
end
+
+ it 'Hara.request_handler should work' do
+ handler = Hara.request_handler
+ handler.class.should == Proc
+ Hara.request_handler do |conn, req|
+ conn + req
+ end
+ Hara.request_handler.call(40, 2).should == 42
+ Hara.request_handler &handler
+ end
end