test/contest.rb in sinatra-1.3.5 vs test/contest.rb in sinatra-1.3.6

- old
+ new

@@ -80,10 +80,12 @@ name = "Test#{sanitize_name(name).gsub(/(^| )(\w)/) { $2.upcase }}" name.tr(" ", "_").to_sym 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) # name.gsub(/\W+/, ' ').strip name.gsub(/\W+/, ' ')