added log functions
[rubygit.git] / tests / units / test_log.rb
blob4dd6a2fc5c4f4d5b0b33acbeec4aaf5f26ea2970
1 #!/usr/bin/env ruby
3 require File.dirname(__FILE__) + '/../test_helper'
5 class TestInit < Test::Unit::TestCase
6   def setup
7     set_file_paths
8     @git = Git.open(@wdir)
9   end
11   def test_get_log_entries
12     log = @git.log
13     assert(log.first.is_a? Git::Commit)
14   end
15   
16   def test_get_log_entries
17     assert_equal(30, @git.log.size)
18     assert_equal(50, @git.log(50).size)
19     assert_equal(10, @git.log(10).size)
20   end
22   def test_get_log_to_s
23     assert_equal(@git.log.to_s.split("\n").first, @git.log.first.sha)
24   end
25   
26 end