Module: TrackWhiles

Defined in:
lib/spec/spec_helper.rb

Instance Method Summary collapse

Instance Method Details

#my_whileObject



94
95
96
97
98
99
100
101
# File 'lib/spec/spec_helper.rb', line 94

def my_while
  @my_while ||= lambda do |condition, body|
    @my_while_calls += 1
    while condition.call
      body.call
    end
  end
end