Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created August 6, 2008 01:06
Show Gist options
  • Save ELLIOTTCABLE/4141 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/4141 to your computer and use it in GitHub Desktop.
class Door
def self.awesome?
"FUCK YEAH!"
end
attr_accessor :color
def initialize
@color = :white
end
def paint color
@color = color
end
end
require 'door'
describe Door do
it "should be fucking awesome" do
Door.should be_awesome
end
describe "painting" do
before(:each) do
@door = Door.new
end
it "should have a color" do
@door.color.should_not be_nil
end
it "should be paintable" do
@door.paint :red
@door.color.should == :red
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment