Avoided calls to Time.now and Time#- unless verbose is enabled #107

wants to merge 1 commit into


None yet

3 participants


Looks like these calls to Time.now and Time#- are only necessary when @verbose is enabled. I changed @start_time to be a local variable. I'm not sure if it needed to be an ivar, but I didn't see it being used elsewhere.


Wouldn't that break this? https://github.com/seattlerb/minitest/blob/master/lib/minitest/unit.rb#L1035

Also if you're removing the ivar you should probably remove the attr_accessor line for it.


Ah, you're right. I don't think the ivar should be removed. It's probably better just to fix the conditionals.

@zenspider zenspider was assigned Mar 21, 2012

Can't do this anymore. I now pass time to the record hook method.

@zenspider zenspider closed this May 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment