From 611f5f4dac6844daa19a1d64b7120f22de94a8b7 Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Mon, 15 Sep 2008 08:55:03 -0400 Subject: [PATCH] Added `should_fail` scenario for testing `should_protect_attributes` * Tests the failure case where the model uses attr_accessible instead of attr_protected --- test/unit/tag_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/tag_test.rb b/test/unit/tag_test.rb index 566e5de5..3afbd864 100644 --- a/test/unit/tag_test.rb +++ b/test/unit/tag_test.rb @@ -7,4 +7,8 @@ class TagTest < Test::Unit::TestCase should_ensure_length_at_least :name, 2 should_protect_attributes :secret + + should_fail do + should_protect_attributes :name + end end