aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-11-23 19:06:45 +0000
committerJosé Valim <jose.valim@gmail.com>2011-11-23 19:06:45 +0000
commitfd86a1b6b068df87164d5763bdcd4a323a1e76f4 (patch)
tree559eecb04f11df12756b9c43018cef32ef3ce3ef /actionpack/test
parent3ee0116c949dfc5760d60fe9c77168fb3868a4ec (diff)
downloadrails-fd86a1b6b068df87164d5763bdcd4a323a1e76f4.tar.gz
rails-fd86a1b6b068df87164d5763bdcd4a323a1e76f4.tar.bz2
rails-fd86a1b6b068df87164d5763bdcd4a323a1e76f4.zip
Rely on a public contract between railties instead of accessing railtie methods directly.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/activerecord/polymorphic_routes_test.rb6
-rw-r--r--actionpack/test/lib/controller/fake_models.rb4
-rw-r--r--actionpack/test/template/form_helper_test.rb2
3 files changed, 5 insertions, 7 deletions
diff --git a/actionpack/test/activerecord/polymorphic_routes_test.rb b/actionpack/test/activerecord/polymorphic_routes_test.rb
index 20d11377f6..fc829aa6b4 100644
--- a/actionpack/test/activerecord/polymorphic_routes_test.rb
+++ b/actionpack/test/activerecord/polymorphic_routes_test.rb
@@ -34,10 +34,8 @@ module Blog
set_table_name 'projects'
end
- def self._railtie
- o = Object.new
- def o.railtie_name; "blog" end
- o
+ def self.use_relative_model_naming?
+ true
end
end
diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb
index 363403092b..f2362714d7 100644
--- a/actionpack/test/lib/controller/fake_models.rb
+++ b/actionpack/test/lib/controller/fake_models.rb
@@ -175,8 +175,8 @@ class HashBackedAuthor < Hash
end
module Blog
- def self._railtie
- self
+ def self.use_relative_model_naming?
+ true
end
class Post < Struct.new(:title, :id)
diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb
index 34486bb151..ccedcd7dac 100644
--- a/actionpack/test/template/form_helper_test.rb
+++ b/actionpack/test/template/form_helper_test.rb
@@ -740,7 +740,7 @@ class FormHelperTest < ActionView::TestCase
assert_dom_equal expected, output_buffer
end
- def test_form_for_with_isolated_namespaced_model
+ def test_form_for_with_model_using_relative_model_naming
form_for(@blog_post) do |f|
concat f.text_field :title
concat f.submit('Edit post')