Skip to content

Instantly share code, notes, and snippets.

@mattpolito
Created April 7, 2011 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpolito/908736 to your computer and use it in GitHub Desktop.
Save mattpolito/908736 to your computer and use it in GitHub Desktop.
Poopin'
class Poop
class << self
def outta_my_butt
"( 0 )"
end
end
# or for all you hipsters
# def self.outta_my_butt
# "( 0 )"
# end
def doesnt_go_there
"( X )"
end
end
Poop.outta_my_butt
poop = Poop.new
poop.doesnt_go_there
Poop.doesnt_go_there # undefined method
let(:poop) { mock_model(Poop) }
poop.stub(:doesnt_go_there).and_return("whoops")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment