aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/template/test_case_test.rb2
-rw-r--r--actionpack/test/template/test_test.rb56
2 files changed, 57 insertions, 1 deletions
diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb
index 387aafebd4..5265ae6b3a 100644
--- a/actionpack/test/template/test_case_test.rb
+++ b/actionpack/test/template/test_case_test.rb
@@ -64,7 +64,7 @@ module ActionView
assert_equal 'Howdy!', from_another_helper
end
- test "determine_default_helper_class returns nil if name.sub(/Test$/, '').constantize resolves to a class" do
+ test "determine_default_helper_class returns nil if the test name constant resolves to a class" do
assert_nil self.class.determine_default_helper_class("String")
end
diff --git a/actionpack/test/template/test_test.rb b/actionpack/test/template/test_test.rb
index 108a674d95..e843a1deb4 100644
--- a/actionpack/test/template/test_test.rb
+++ b/actionpack/test/template/test_test.rb
@@ -78,3 +78,59 @@ class CrazyStringHelperTest < ActionView::TestCase
assert_equal PeopleHelper, self.class.helper_class
end
end
+
+describe PeopleHelper do
+ it "resolves the right helper_class" do
+ assert_equal PeopleHelper, self.class.helper_class
+ end
+end
+
+describe PeopleHelper, :helper_class do
+ it "resolves the right helper_class" do
+ assert_equal PeopleHelper, self.class.helper_class
+ end
+end
+
+describe PeopleHelper do
+ describe "even while nested" do
+ it "resolves the right helper_class" do
+ assert_equal PeopleHelper, self.class.helper_class
+ end
+ end
+end
+
+describe PeopleHelper, :helper_class do
+ describe "even while nested" do
+ it "resolves the right helper_class" do
+ assert_equal PeopleHelper, self.class.helper_class
+ end
+ end
+end
+
+describe "PeopleHelper" do
+ it "resolves the right helper_class" do
+ assert_equal PeopleHelper, self.class.helper_class
+ end
+end
+
+describe "PeopleHelperTest" do
+ it "resolves the right helper_class" do
+ assert_equal PeopleHelper, self.class.helper_class
+ end
+end
+
+describe "PeopleHelper" do
+ describe "even while nested" do
+ it "resolves the right helper_class" do
+ assert_equal PeopleHelper, self.class.helper_class
+ end
+ end
+end
+
+describe "PeopleHelperTest" do
+ describe "even while nested" do
+ it "resolves the right helper_class" do
+ assert_equal PeopleHelper, self.class.helper_class
+ end
+ end
+end