Permalink
Browse files

avoid test name collision

  • Loading branch information...
rkh committed Mar 10, 2013
1 parent 6148a74 commit 59fe11ba55497857f65c094a2db31ebf97d61869
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 59fe11b

Please sign in to comment.