history_spec.rb revision a1dfa680e0ec6ac58a9a999def342fd3cd4a3a0a
require 'spec_helper'
describe "git history" do
let(:userinfo) do
{
time: Time.now
}
end
context 'without bash' do
after do
end
before do
@commit_other2 = repository.commit_file(userinfo, 'Other content2', 'file2.txt', 'Other File: Change1')
@commit_other3 = repository.commit_file(userinfo, 'Other content3', 'file2.txt', 'Other File: Change2')
@commits_all = [@commit_add1, @commit_change1, @commit_other1,
@commits_file = [@commit_delete2, @commit_change2, @commit_add2,
end
it 'should make no difference between explicitly starting at HEAD or not specifying the start-oid' do
end
end
end
it 'should make no difference between explicitly starting at HEAD or not specifying the start-oid' do
end
end
end
to eq([@commit_change2, @commit_add2, @commit_other3, @commit_other2])
end
to eq([@commit_change2, @commit_add2])
end
to eq([@commit_delete1, @commit_change1, @commit_add1])
end
end
end
to eq(@commits_file)
end
end
to eq([@commit_delete2, @commit_change2, @commit_add2])
end
to eq(@commits_all)
end
it 'should have the correct commits with an offset and limit ending before reaching the "init" commit' do
to eq([@commit_add2, @commit_other3, @commit_other2])
end
to eq([@commit_other1, @commit_change1, @commit_add1])
end
it 'should have the correct commits with an offset and limit ending after reaching the "init" commit' do
to eq([@commit_other1, @commit_change1, @commit_add1])
end
to eq([@commit_delete2, @commit_change2, @commit_add2,
end
to eq(@commits_file)
end
to eq(@commits_file)
end
it 'should have the correct commits with an offset and limit ending after reaching the "init" commit' do
to eq([@commit_add1])
end
end
end
end
[ [@commit_add1, @commit_change1],
[@commit_add1, @commit_delete1],
[@commit_delete1, @commit_add2],
[@commit_delete1, @commit_delete2] ].each do |previous, current|
end
end
end
end
end
{
time: Time.now
}
end
after do
end
# See script for details
"#{m}\n"
end
end
end