Guest User

Untitled

a guest
Jun 20th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. def today_is date
  2. now = Time.zone.parse date
  3. today = now.to_date
  4.  
  5. Time.zone.stub!( :now ).and_return( now )
  6. Time.stub!( :now ).and_return(now)
  7. Date.stub!( :today ).and_return( today )
  8. end
Add Comment
Please, Sign In to add comment