0
@@ -7,18 +7,19 @@ describe RemoteController do
0
@git = Git.singleton_new
0
+ @git.config.stub!(:[]).with("branch.master.remote").and_return("origin")
0
+ @git.config.stub!(:[]).with("git-tmbundle.log.limit").and_return(5)
0
- @git.config.stub!(:[]).with("branch.master.remote").and_return("origin")
0
Git.command_response["branch"] = "* master\n"
0
Git.command_response["config", "branch.master.remote"] = %Q{origin}
0
Git.command_response["remote"] = %Q{origin}
0
git = Git.singleton_new
0
- git.should_receive(:log).with(
{:path=>".", :revisions=>["74c0fdf", "d1c6bdd"]}).and_return(parse_log(fixture_file("log_with_diffs.txt")))
0
+ git.should_receive(:log).with(
:path=>".", :revisions=>["74c0fdf", "d1c6bdd"], :limit => 5).and_return(parse_log(fixture_file("log_with_diffs.txt")))
0
Git.command_response["fetch", "origin"] = fixture_file("fetch_1_5_4_3_output.txt")
0
@@ -45,7 +46,6 @@ describe RemoteController do
0
Git.command_response["branch"] = "* master\n"
0
Git.command_response["branch", "-r"] = " origin/master\n origin/release\n"
0
@git.config.stub!(:[]).with("remote.origin.fetch").and_return("+refs/heads/*:refs/remotes/origin/*")
0
- @git.config.stub!(:[]).with("branch.master.remote").and_return('origin')
0
@git.config.stub!(:[]).with("branch.master.merge").and_return("refs/heads/master")
0
Git.command_response["remote"] = %Q{origin}
0
@@ -89,7 +89,7 @@ describe RemoteController do
0
it "should run all git commands" do
0
- Git.commands_ran.should == [["branch"], ["remote"], ["push", "origin", "master"], ["log", "
865f920..f9ca10d", "."], ["branch"], ["branch"]]
0
+ Git.commands_ran.should == [["branch"], ["remote"], ["push", "origin", "master"], ["log", "
-n", 5, "865f920..f9ca10d", "."], ["branch"], ["branch"]]
0
it "should output log with diffs" do
Comments
No one has commented yet.