spec/private/path_spec.rb in usher-0.5.6 vs spec/private/path_spec.rb in usher-0.5.7

- old
+ new

@@ -1,6 +1,7 @@ -require 'lib/usher' +require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper")) +require "usher" route_set = Usher.new describe "Usher route adding" do @@ -20,18 +21,17 @@ 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 == [ - ['/', "a", '/', "b"], - ['/', "a", '/', "b", '/', "c", '/', "d"], - ['/', "a", '/', "b", '/', "d", '/', "e"], - ['/', "a", '/', "b", '/', "c"], - ['/', "a", '/', "b", '/', "d"], - ['/', "a", '/', "b", '/', "c", '/', "d", '/', "e"] + ["/", "a", "/", "b"], + ["/", "a", "/", "b", "/", "c"], + ["/", "a", "/", "b", "/", "d"], + ["/", "a", "/", "b", "/", "c", "/", "d"], + ["/", "a", "/", "b", "/", "d", "/", "e"], + ["/", "a", "/", "b", "/", "c", "/", "d", "/", "e"] ] - end it "should allow named routes to be added" do route_set.add_named_route(:route, '/bad/route', :controller => 'sample').should == route_set.named_routes[:route] end @@ -71,6 +71,6 @@ @p1.merge(@p2).route.should == @p1.route end end -end \ No newline at end of file +end