public
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/thoughtbot/shoulda.git
Search Repo:
fixed naming of should_require_unique_attributes when scope is not set #38
tsaleh (author)
Thu Jun 26 13:17:29 -0700 2008
commit  66fc5c31bf27a086e2ebe9f74acce6d5562ad419
tree    7e6b1b7c73559916414e6c47a18778c05cee8abb
parent  be2df7d3c3c4da3ee4efae74310ec564bfb1cef3
...
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.