Permalink
Browse files

avoid test name collision

  • Loading branch information...
1 parent 84a0da3 commit 3223f194f60d0c79f41af86db59d8e86c1452c95 @rkh rkh committed Mar 10, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 test/contest.rb
View
@@ -82,7 +82,9 @@ def self.context_name(name)
end
def self.test_name(name)
- "test_#{sanitize_name(name).gsub(/\s+/,'_')}".to_sym
+ name = "test_#{sanitize_name(name).gsub(/\s+/,'_')}_0"
+ name = name.succ while method_defined? name
+ name.to_sym
end
def self.sanitize_name(name)

0 comments on commit 3223f19

Please sign in to comment.