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

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@tenderlove
Member

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.

@phiggins
Member

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.

@tenderlove
Member

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
@zenspider
Member

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