Skip to content

Commit f0d3ed8

Browse files
author
Edward Thomson
committed
test: provide committer information in rebase test
1 parent 411a304 commit f0d3ed8

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/rebase_test.rb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,9 @@ def test_inmemory_already_applied_patch
154154
end
155155

156156
def test_rebase_does_not_lose_files
157-
commit = Rugged::Commit.create(@repo, {
157+
Rugged::Commit.create(@repo, {
158158
:author => { :email => "[email protected]", :time => Time.now, :name => "Rebaser" },
159+
:committer => { :email => "[email protected]", :time => Time.now, :name => "Rebaser" },
159160
:message => "Add some files",
160161
:parents => [ @repo.branches["gravy"].target_id ],
161162
:update_ref => "refs/heads/gravy",
@@ -170,16 +171,17 @@ def test_rebase_does_not_lose_files
170171

171172
rebase = Rugged::Rebase.new(@repo, "refs/heads/gravy", "refs/heads/veal")
172173

173-
rebase.next
174+
assert rebase.next
174175
assert rebase.commit({ committer: { :email => "[email protected]", :name => "Rebaser" } })
175176

176-
rebase.next
177+
assert rebase.next
177178
assert rebase.commit({ committer: { :email => "[email protected]", :name => "Rebaser" } })
178179
end
179180

180181
def test_inmemory_rebase_does_not_lose_files
181-
commit = Rugged::Commit.create(@repo, {
182+
Rugged::Commit.create(@repo, {
182183
:author => { :email => "[email protected]", :time => Time.now, :name => "Rebaser" },
184+
:committer => { :email => "[email protected]", :time => Time.now, :name => "Rebaser" },
183185
:message => "Add some files",
184186
:parents => [ @repo.branches["gravy"].target_id ],
185187
:update_ref => "refs/heads/gravy",
@@ -194,10 +196,10 @@ def test_inmemory_rebase_does_not_lose_files
194196

195197
rebase = Rugged::Rebase.new(@repo, "refs/heads/gravy", "refs/heads/veal", inmemory: true)
196198

197-
rebase.next
199+
assert rebase.next
198200
assert rebase.commit({ committer: { :email => "[email protected]", :name => "Rebaser" } })
199201

200-
rebase.next
202+
assert rebase.next
201203
assert rebase.commit({ committer: { :email => "[email protected]", :name => "Rebaser" } })
202204
end
203205
end

0 commit comments

Comments
 (0)