Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document class method stubbing #7

Open
searls opened this issue Feb 27, 2012 · 0 comments
Open

document class method stubbing #7

searls opened this issue Feb 27, 2012 · 0 comments

Comments

@searls
Copy link
Owner

searls commented Feb 27, 2012

add notes on stubbing class methods to the readme.

If you've got:

def Hockey
  def self.score
  end
end

You can just stub it with give(Hockey).score { "GOOOOAL!" }

And then, predictably, calling Hockey.score() will give you what you stubbed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant