test/setup.rb in couchbase-model-0.5.3 vs test/setup.rb in couchbase-model-0.5.4
- old
+ new
@@ -161,8 +161,11 @@
ensure
stop_mock(mock) if mock
end
def uniq_id(*suffixes)
- [caller.first[/.*[` ](.*)'/, 1], suffixes].join('_')
+ test_id = [caller.first[/.*[` ](.*)'/, 1], suffixes].compact.join('_')
+ @ids ||= {}
+ @ids[test_id] ||= Time.now.to_f
+ [test_id, @ids[test_id]].join('_')
end
end