From f1e0d37b15914ce7f17a612c8afb4452a501ecd7 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 5 Jun 2013 15:50:11 +0300 Subject: Its better to load graph with ajax since it requires ~10 seconds for bigger projects to finish up --- spec/lib/gitlab/git_stats_log_parser_spec.rb | 37 ---------------------------- spec/lib/gitlab/git_stats_spec.rb | 36 --------------------------- 2 files changed, 73 deletions(-) delete mode 100644 spec/lib/gitlab/git_stats_log_parser_spec.rb delete mode 100644 spec/lib/gitlab/git_stats_spec.rb (limited to 'spec/lib') diff --git a/spec/lib/gitlab/git_stats_log_parser_spec.rb b/spec/lib/gitlab/git_stats_log_parser_spec.rb deleted file mode 100644 index c97b32275db..00000000000 --- a/spec/lib/gitlab/git_stats_log_parser_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'spec_helper' -require 'gitlab/git_stats_log_parser' - - -describe LogParser do - - describe "#self.parse_log" do - context "log_from_git is a valid log" do - it "returns the correct log" do - fake_log = "Karlo Soriano -2013-05-09 - - 14 files changed, 471 insertions(+) -Dmitriy Zaporozhets -2013-05-08 - - 1 file changed, 6 insertions(+), 1 deletion(-) -Dmitriy Zaporozhets -2013-05-08 - - 6 files changed, 19 insertions(+), 3 deletions(-) -Dmitriy Zaporozhets -2013-05-08 - - 3 files changed, 29 insertions(+), 3 deletions(-)"; - - lp = LogParser.parse_log(fake_log) - lp.should eq([ - {author: "Karlo Soriano", date: "2013-05-09", additions: 471}, - {author: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 6, deletions: 1}, - {author: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 19, deletions: 3}, - {author: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 29, deletions: 3}]) - end - end - end - -end \ No newline at end of file diff --git a/spec/lib/gitlab/git_stats_spec.rb b/spec/lib/gitlab/git_stats_spec.rb deleted file mode 100644 index f9c70da2bd5..00000000000 --- a/spec/lib/gitlab/git_stats_spec.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'spec_helper' - -describe Gitlab::GitStats do - - describe "#parsed_log" do - let(:stats) { Gitlab::GitStats.new(nil, nil) } - before(:each) do - stats.stub(:log).and_return("anything") - end - - context "LogParser#parse_log returns 'test'" do - it "returns 'test'" do - LogParser.stub(:parse_log).and_return("test") - stats.parsed_log.should eq("test") - end - end - end - - describe "#log" do - let(:repo) { Repository.new(nil, nil) } - let(:gs) { Gitlab::GitStats.new(repo.raw, repo.root_ref) } - - before(:each) do - repo.stub(:raw).and_return(nil) - repo.stub(:root_ref).and_return(nil) - repo.raw.stub(:git) - end - - context "repo.git.run returns 'test'" do - it "returns 'test'" do - repo.raw.git.stub(:run).and_return("test") - gs.log.should eq("test") - end - end - end -end \ No newline at end of file -- cgit v1.2.3