test/test_commit.rb in mercurial-ruby-0.7.1 vs test/test_commit.rb in mercurial-ruby-0.7.2

- old
+ new

@@ -1,6 +1,6 @@ -require 'helper' +require File.dirname(__FILE__) + '/helper' describe Mercurial::Commit do before do @repository = Mercurial::Repository.open(Fixtures.test_repo) @@ -59,8 +59,17 @@ end it "should return an array of branches where it exists" do commit = @repository.commits.by_hash_id('cd9fa0c59c7f') commit.exist_in_branches.map(&:name).sort.must_equal %w(default another-branch).sort + end + + it "should fetch stats" do + commit = @repository.commits.by_hash_id('cd9fa0c59c7f') + stats = commit.stats + stats['files'].must_equal 3 + stats['additions'].must_equal 85 + stats['deletions'].must_equal 6 + stats['total'].must_equal 91 end end