-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Minor Change
In https://jira.mongodb.org/browse/RUBY-1752 a workaround was added for applications that returned frozen Time objects from Time.now (via mocks).
Such behavior is not how the standard library Time.now works, hence the driver shouldn't be working around it.
RSpec provides a pattern for returning new values:
expect(object).to receive(:method) { value.dup }
- related to
-
RUBY-1752 Mocking Time.now, reusing and mutating the mock value can break tests
- Closed
- links to