diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 16:19:09 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-01-03 16:19:09 +0100 |
commit | 7b9bb83a925a9df103de4eb533872ead7f45bb29 (patch) | |
tree | 1c137430927767904554c2a265ce2270743503cf /spec/node_spec.rb | |
parent | 8d828ff3b4e06a7161db63f08e3a74701b51c344 (diff) | |
download | zorglub-7b9bb83a925a9df103de4eb533872ead7f45bb29.zip zorglub-7b9bb83a925a9df103de4eb533872ead7f45bb29.tar.gz |
add simple method and 404 specs
Diffstat (limited to 'spec/node_spec.rb')
-rw-r--r-- | spec/node_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/node_spec.rb b/spec/node_spec.rb index 0ef3486..06b7fe0 100644 --- a/spec/node_spec.rb +++ b/spec/node_spec.rb @@ -42,6 +42,18 @@ describe Zorglub do Node1.r(1,'arg2',"some").should == "/spec1/1/arg2/some" end # + it "should return err404 response when no method found" do + Node0.respond_to?('noresponse').should be_false + r = Node2.call( {'PATH_INFO'=>'/noresponse'} ) + r.status.should == 404 + end + # + it "simple method should respond" do + r = Node0.call( {'PATH_INFO'=>'/hello'} ) + r.status.should == 200 + r.body[0].should == 'world' + end + # end # end |