Actions
Defect #7613
closedGenerated test instances may share the same attribute value object
Start date:
2011-02-12
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Actually, this test code will fail :
p1 = Project.generate! p2 = Project.generate! assert_not_equal p1.identifier, p2.identifier
That's because ObjectDaddy Project identifier generator actually returns the same object each time.
Thus, in source:trunk/test/exemplars/project_exemplar.rb :
# Project#next_identifier is defined on Redmine def self.next_identifier_from_object_daddy @last_identifier ||= 'project-0000' @last_identifier.succ! @last_identifier end
Should be :
# Project#next_identifier is defined on Redmine def self.next_identifier_from_object_daddy(last_identifier) last_identifier ||= 'project-0000' last_identifier.succ end
I'll post a patch soon.
Files
Actions