test/test_hoc.rb in hoc-0.1 vs test/test_hoc.rb in hoc-0.2
- old
+ new
@@ -36,13 +36,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 test
")
assert HOC::Base.new(dir, 'total').report > 0
+ end
+ end
+
+ def test_fails_if_not_repo
+ Dir.mktmpdir 'test' do |dir|
+ assert_raises RuntimeError do
+ HOC::Base.new(dir, 'total').report
+ end
end
end
end