Skip to content

Instantly share code, notes, and snippets.

@xenda
Created August 26, 2010 21:49
Show Gist options
  • Save xenda/552326 to your computer and use it in GitHub Desktop.
Save xenda/552326 to your computer and use it in GitHub Desktop.
class TimeModel
attr_accessor :values
def initialize
@values = {:minutes => 0, :seconds => 0, :hours => 0}
end
def increment_seconds
@values[:seconds] += 1
end
def seconds
@values[:seconds]
end
end
def testIncrementoSegundo
myTime = TimeModel.new
initial_seconds = myTime.seconds
myTime.increment_seconds
result = myTime.seconds - initial_seconds
assert 1, result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment