spec/path_spec.rb in joshbuddy-usher-0.0.2 vs spec/path_spec.rb in joshbuddy-usher-0.0.3

- old
+ new

@@ -1,12 +1,9 @@ require 'lib/usher' route_set = Usher.new -S = Usher::Route::Separator::Slash -D = Usher::Route::Separator::Dot - describe "Usher route adding" do before(:each) do route_set.reset! end @@ -23,15 +20,15 @@ end it "should add every kind of optional route possible" do route_set.add_route('/a/b(/c)(/d(/e))') route_set.routes.first.paths.collect{|a| a.parts }.should == [ - [S, "a", S, "b"], - [S, "a", S, "b", S, "c"], - [S, "a", S, "b", S, "d"], - [S, "a", S, "b", S, "d", S, "e"], - [S, "a", S, "b", S, "c", S, "d"], - [S, "a", S, "b", S, "c", S, "d", S, "e"] + ["a", "b"], + ["a", "b", "c"], + ["a", "b", "d"], + ["a", "b", "d", "e"], + ["a", "b", "c", "d"], + ["a", "b", "c", "d", "e"] ] end it "should allow named routes to be added" do \ No newline at end of file