summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-01-03 23:12:43 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2012-01-03 23:12:43 +0100
commit069ab960ad7afcfbcabc35dcaa904c5940ee1b5c (patch)
tree75a91ce23619ab01cfb744568fb495f6edb78196
parentd11475831dd832bda1bad297dce6cc0fc630f3d4 (diff)
downloadzorglub-069ab960ad7afcfbcabc35dcaa904c5940ee1b5c.zip
zorglub-069ab960ad7afcfbcabc35dcaa904c5940ee1b5c.tar.gz
spec: remap nodes
-rw-r--r--spec/app_spec.rb6
-rw-r--r--spec/node_spec.rb2
-rw-r--r--spec/spec_helper.rb8
3 files changed, 8 insertions, 8 deletions
diff --git a/spec/app_spec.rb b/spec/app_spec.rb
index d17c365..0e8375b 100644
--- a/spec/app_spec.rb
+++ b/spec/app_spec.rb
@@ -19,7 +19,7 @@ describe Zorglub do
end
#
it "at should return mapped node" do
- APP.at("/spec1").should be Node1
+ APP.at("/node1").should be Node1
end
#
it "at should return nil if no Node mapped" do
@@ -27,7 +27,7 @@ describe Zorglub do
end
#
it "to should return path to node" do
- APP.to(Node1).should == "/spec1"
+ APP.to(Node1).should == "/node1"
end
#
it "to should return nil if not an existing Node" do
@@ -35,7 +35,7 @@ describe Zorglub do
end
#
it "to_hash should return a correct hash" do
- APP.to_hash["/spec1"].should be Node1
+ APP.to_hash["/node1"].should be Node1
end
#
end
diff --git a/spec/node_spec.rb b/spec/node_spec.rb
index ae18a05..40ea901 100644
--- a/spec/node_spec.rb
+++ b/spec/node_spec.rb
@@ -34,7 +34,7 @@ describe Zorglub do
end
#
it "r should build a well formed path" do
- Node1.r(1,'arg2',"some").should == "/spec1/1/arg2/some"
+ Node1.r(1,'arg2',"some").should == "/node1/1/arg2/some"
end
#
it "should return err404 response when no method found" do
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index faf5cc3..aa096e7 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -69,11 +69,11 @@ class Node3 < Zorglub::Node
end
#
APP = Zorglub::App.new do
- map '/spec0', Node0
- map '/spec1', Node1
- map '/spec3', Node3
+ map '/node0', Node0
+ map '/node1', Node1
+ map '/node3', Node3
end
class Node2
- map APP, '/spec2'
+ map APP, '/node2'
end
#