Skip to content

Instantly share code, notes, and snippets.

@gabrielg
Created October 26, 2008 20:22
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 gabrielg/19941 to your computer and use it in GitHub Desktop.
Save gabrielg/19941 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'mocha'
module Grudge
module Repository
end
end
class Commit
def self.download!(whatever)
Grudge::Repository.latest_commits_since(whatever) do |repo_commit|
puts "HEY [#{repo_commit}]"
end
end
end
repo_commits = ['a', 'b', 'c']
Grudge::Repository.expects(:latest_commits_since).multiple_yields(*repo_commits)
Commit.download!(nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment