diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-05 16:50:11 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-06-05 16:50:11 +0400 |
commit | f1e0d37b15914ce7f17a612c8afb4452a501ecd7 (patch) | |
tree | 697f9b06dcab2e491856b10be1692178d8ca4144 /spec | |
parent | 64457799c5b77fe121374a2c9dbd2ad01d3a3836 (diff) |
Its better to load graph with ajax since it requires ~10 seconds for bigger projects to finish up
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/git_stats_log_parser_spec.rb | 37 | ||||
-rw-r--r-- | spec/lib/gitlab/git_stats_spec.rb | 36 |
2 files changed, 0 insertions, 73 deletions
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 |