Skip to content
Browse files

failing test to demonstrate how an engine can't change the scope it's…

… mounted on
  • Loading branch information...
1 parent 12ac977 commit 39deaec93b3dbdfd1fd417ae0f2f58ced4d53172 @sigmike sigmike committed Jun 25, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 actionpack/test/dispatch/prefix_generation_test.rb
View
10 actionpack/test/dispatch/prefix_generation_test.rb
@@ -31,6 +31,7 @@ def self.routes
match "/polymorphic_path_for_engine", :to => "inside_engine_generating#polymorphic_path_for_engine"
match "/conflicting_url", :to => "inside_engine_generating#conflicting"
match "/foo", :to => "never#invoked", :as => :named_helper_that_should_be_invoked_only_in_respond_to_test
+ match "/link_to_another_scope", :to => "inside_engine_generating#link_to_another_scope", :as => :link_to_another_scope
end
routes
@@ -100,6 +101,10 @@ def polymorphic_path_for_engine
def conflicting
render :text => "engine"
end
+
+ def link_to_another_scope
+ render :text => url_for(:omg => "more-awesomeness", :only_path => true)
+ end
end
class ::OutsideEngineGeneratingController < ActionController::Base
@@ -188,6 +193,11 @@ def setup
assert_equal "engine", last_response.body
end
+ test "[ENGINE] link to another scope" do
+ get "/some-awesomeness/blog/link_to_another_scope"
+ assert_equal "/more-awesomeness/blog/link_to_another_scope", last_response.body
+ end
+
# Inside Application
test "[APP] generating engine's route includes prefix" do
get "/generate"

0 comments on commit 39deaec

Please sign in to comment.
Something went wrong with that request. Please try again.