Skip to content

Commit 8573fa7

Browse files
author
Dawa Ometto
committed
Test callback option arguments
1 parent eb866ce commit 8573fa7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/repo_apply_test.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,13 @@ def test_callbacks
138138
assert_raises RuntimeError do
139139
@repo.apply(diff, {:location => :index, :delta_callback => delta_fail})
140140
end
141+
142+
assert_raises ArgumentError do
143+
@repo.apply(diff, {:location => :index, :delta_callback => 'this is not a callable object'})
144+
end
145+
146+
assert_raises ArgumentError do
147+
@repo.apply(diff, {:location => :index, :hunk_callback => 'this is not a callable object'})
148+
end
141149
end
142150
end

0 commit comments

Comments
 (0)