spec/lib/rtml/routes_spec.rb in rtml-2.0.3 vs spec/lib/rtml/routes_spec.rb in rtml-2.0.4
- old
+ new
@@ -19,33 +19,34 @@
it "should find a route" do
route.should == { :controller => 'rtml', :action => 'action', :format => 'rtml' }
end
end
- context "with double connection" do
- before(:each) do
- ActionController::Routing::Routes.reload!
- ActionController::Routing::Routes.draw { |map| map.connect_rtml :controller => 'another' }
- end
-
- after(:each) do
- ActionController::Routing::Routes.reload!
- end
-
- # removed since it doesn't really matter in the long run -- this stuff all gets optimized by rails.
-# it "should not double connect generic routes" do
-# matches = []
-# ActionController::Routing::Routes.routes.each do |route|
-# matches.should_not include(route.segments.to_s)
-# matches << route.segments.to_s
-# end
+ # Turns out this was not possible, because Rails freezes the route objects.
+# context "with double connection" do
+# before(:each) do
+# ActionController::Routing::Routes.reload!
+# ActionController::Routing::Routes.draw { |map| map.connect_rtml :controller => 'another' }
# end
-
- it "should update nongeneric routes" do
+#
+# after(:each) do
+# ActionController::Routing::Routes.reload!
+# end
+#
+# # removed since it doesn't really matter in the long run -- this stuff all gets optimized by rails.
+## it "should not double connect generic routes" do
+## matches = []
+## ActionController::Routing::Routes.routes.each do |route|
+## matches.should_not include(route.segments.to_s)
+## matches << route.segments.to_s
+## end
+## end
+#
+# it "should update nongeneric routes" do
# route("/index.tml")[:controller].should == 'another'
- end
- end
+# end
+# end
it "should match /index.tml" do
- route("/index.tml").should == { :controller => 'rtml', :action => 'index', :format => 'rtml' }
+ route("/index.tml").should == { :controller => 'inherited', :action => 'index', :format => 'rtml' }
end
end