Created
August 26, 2010 21:49
-
-
Save xenda/552326 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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