Created
July 26, 2011 11:48
-
-
Save isaacsanders/1106558 to your computer and use it in GitHub Desktop.
Tim's Methods
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
require 'rspec' | |
require 'date' | |
describe "Tim's Methods" do | |
it "should be clear that Tim needs to get his ass back here" do | |
do_we_want_tim_back = TimsRep.new.do_we_like_him? | |
do_we_want_tim_back.should == true | |
end | |
end | |
class TimsRep | |
attr_accessor :days_gone | |
def initialize | |
@days_gone = Date.today - Date.commercial(2011,27,4) | |
end | |
def do_we_like_him? | |
do_we_remember_who_he_is? | |
end | |
def do_we_remember_who_he_is? | |
days_gone < 40 ? true : false | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment