Skip to content

Instantly share code, notes, and snippets.

@zmoazeni
Created May 29, 2009 13:33
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 zmoazeni/119950 to your computer and use it in GitHub Desktop.
Save zmoazeni/119950 to your computer and use it in GitHub Desktop.
## spec "should stop the director" (line 49), this is all the setup code in order:
# from line 3
@target = Example.new
# starting from line 8
@director = mock
@runner = mock
@runner.stubs(:prepare)
@director.stubs(:go?).returns false
@runner.stubs(:finish)
# from line 28
@director.stubs(:go?).returns true
@runner.stubs(:run)
@runner.stubs(:complete?).returns false
@runner.stubs(:stop)
# from line 46
@runner.stubs(:complete?).returns true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment