Advertisement
Guest User

spec with range iterate

a guest
Jan 15th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.23 KB | None | 0 0
  1. describe 'match_time' do
  2.  
  3.   it 'should match times from 00:00 AM to 12:59 AM' do
  4.     (0..12).each do |h|
  5.       (0..59).each do |m|
  6.         match_time("%02i:%02i AM" % [h, m]).should_not be_nil
  7.       end
  8.     end
  9.   end
  10.  
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement