Skip to content

Instantly share code, notes, and snippets.

@isaacsanders
Created July 26, 2011 11:48
Show Gist options
  • Save isaacsanders/1106558 to your computer and use it in GitHub Desktop.
Save isaacsanders/1106558 to your computer and use it in GitHub Desktop.
Tim's Methods
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