Take the 2008 Git User's Survey and help out! [ hide ]

public
Fork of thoughtbot/shoulda
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/boone/shoulda.git
Search Repo:
Corrected to hide scope when scope array is blank.
boone (author)
Sat Jun 07 12:12:14 -0700 2008
commit  7e96fc577e3ef8bcce0d2b16d657e46acec092b6
tree    c1f86cda2ad2a98161ff9b7ca6d89cdfa5734f01
parent  fa21ea937436aa2f02fcea830da218616b149d59
...
67
68
69
70
 
71
72
73
...
67
68
69
 
70
71
72
73
0
@@ -67,7 +67,7 @@ module ThoughtBot # :nodoc:
0
         klass = model_class
0
         attributes.each do |attribute|
0
           attribute = attribute.to_sym
0
- should "require unique value for #{attribute}#{" scoped to #{scope.join(', ')}" if scope}" do
0
+ should "require unique value for #{attribute}#{" scoped to #{scope.join(', ')}" unless scope.blank?}" do
0
             assert existing = klass.find(:first), "Can't find first #{klass}"
0
             object = klass.new
0
             

Comments

    No one has commented yet.