spec/hara_spec.rb in hara-0.1.0 vs spec/hara_spec.rb in hara-0.2.0
- old
+ new
@@ -8,15 +8,13 @@
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
+ it 'Hara.encode_msg & decode_msg should work' do
+ action = 'hello_world'
+ args = ['hello', 'world']
+ action_d, args_d = Hara.decode_msg Hara.encode_msg(action, *args)
+ action.should == action_d
+ args.should == args_d
end
end