From 7e96fc577e3ef8bcce0d2b16d657e46acec092b6 Mon Sep 17 00:00:00 2001 From: Mike Boone Date: Sat, 7 Jun 2008 15:12:14 -0400 Subject: [PATCH] Corrected to hide scope when scope array is blank. --- lib/shoulda/active_record_helpers.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/shoulda/active_record_helpers.rb b/lib/shoulda/active_record_helpers.rb index ec84057..76135ab 100644 --- a/lib/shoulda/active_record_helpers.rb +++ b/lib/shoulda/active_record_helpers.rb @@ -67,7 +67,7 @@ module ThoughtBot # :nodoc: klass = model_class attributes.each do |attribute| attribute = attribute.to_sym - should "require unique value for #{attribute}#{" scoped to #{scope.join(', ')}" if scope}" do + should "require unique value for #{attribute}#{" scoped to #{scope.join(', ')}" unless scope.blank?}" do assert existing = klass.find(:first), "Can't find first #{klass}" object = klass.new -- 1.5.5.1