test/test_git.rb in hoc-0.1 vs test/test_git.rb in hoc-0.2
- old
+ new
@@ -35,14 +35,23 @@
system("
set -e
set -x
cd '#{dir}'
git init .
+ git config user.email test@teamed.io
+ git config user.name test
echo 'hello, world!' > test.txt
git add test.txt
- git commit -m test
+ git commit -am 'add line'
+ echo 'good bye, world!' > test.txt
+ git commit -am 'modify line'
+ rm test.txt
+ git commit -am 'delete line'
")
hits = HOC::Git.new(dir).hits
- assert_equal 1, hits.size
+ assert_equal 3, hits.size
+ assert_equal 1, hits[0].total
+ assert_equal 2, hits[1].total
+ assert_equal 1, hits[2].total
end
end
end