Lines Matching refs:repository
7 let(:path) { '/tmp/ontohub/test/unit/git/repository' }
8 let(:repository) { GitRepository.new(path) }
20 before { repository.commit_file(userinfo, content, filepath, message) }
22 it { expect(repository.path_exists?(filepath)).to be(true) }
23 it { expect(repository.get_file(filepath).name).to eq(filepath.split('/')[-1]) }
24 it { expect(repository.get_file(filepath).content).to eq(content) }
25 it { expect(repository.get_file(filepath).mime_type).to eq(Mime::Type.lookup('text/plain')) }
26 it { expect(repository.commit_message).to eq(message) }
27 it { expect(repository.commit_author[:name]).to eq(userinfo[:name]) }
33 repository.commit_file(userinfo, content, filepath, message)
34 repository.delete_file(userinfo, filepath)
37 it { expect(repository.path_exists?(filepath)).to be(false) }
45 repository.commit_file(userinfo, content, filepath, message)
46 @first_commit_oid = repository.head_oid
47 repository.commit_file(userinfo, content2, filepath, message2)
50 it { expect(repository.get_file(filepath).content).to eq(content2) }
51 it { expect(repository.commit_message(repository.head_oid)).to eq(message2) }
52 it { expect(@first_commit_oid).not_to eq(repository.head_oid) }
59 before { repository.commit_file(userinfo, content, fullpath, message) }
61 it { expect(repository.points_through_file?(folder)).to be(false) }
62 it { expect(repository.points_through_file?(fullpath)).to be(false) }
63 it { expect(repository.points_through_file?("#{fullpath}/foo")).to be(true) }
67 before { repository.commit_file(userinfo, content, filepath, message) }
71 repository.commit_file(userinfo, content, "#{filepath}/foo", message)
76 context 'reset state on empty repository with failing commit block' do
79 repository.commit_file(userinfo, content, filepath, message) do
88 @first_commit_oid = repository.commit_file(userinfo, content, filepath, message)
91 repository.commit_file(userinfo, "#{content}!", filepath, message) do
99 skip { expect(@first_commit_oid).to eq(repository.head_oid) }