From 8be09e6674ee70ca31370f0c72b74202760e9aed Mon Sep 17 00:00:00 2001 From: Nobuhiro IMAI Date: Sun, 16 May 2010 16:12:13 +0200 Subject: [PATCH] prevent to be run fixture accessor (e.g. test_foos for TestFoo model) as a test case Signed-off-by: Wijnand Wiersma --- activerecord/test/cases/fixtures_test.rb | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index e9c2802..6096002 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -258,6 +258,11 @@ class FixturesWithoutInstantiationTest < ActiveRecord::TestCase assert_equal false, respond_to?(:topics, false), "should be private method" assert_equal true, respond_to?(:topics, true), "confirm to respond surely" end + + def test_visibility_of_accessor_method + assert_equal false, respond_to?(:topics, false), "should be private method" + assert_equal true, respond_to?(:topics, true), "confirm to respond surely" + end def test_accessor_methods assert_equal "The First Topic", topics(:first).title -- 1.6.4.2