# File test/test_rubygit_index.rb, line 51 def test_ordered_properly sha = @git.commits.first.tree.id i = @git.index i.read_tree(sha) i.add('lib.rb', 'test stuff') i.commit('message', [@git.commits.first], @user, nil, 'master') tr = @git.commits.first.tree.contents entries = tr.select { |c| c.name[0, 3] == 'lib' }.map { |c| c.name } assert_equal 'lib.rb', entries[0] assert_equal 'lib', entries[1] end