Skip to content

Commit af6d668

Browse files
committed
fix jruby exposing expect been thread unsafe, also allow is sufficient
1 parent b12533a commit af6d668

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/image_optim_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def temp_copy(image)
204204
image_optim = ImageOptim.new
205205
results = test_images.map do |src|
206206
dst = double
207-
expect(image_optim).to receive(method).with(src).and_return(dst)
207+
allow(image_optim).to receive(method).with(src).and_return(dst)
208208
[src, dst]
209209
end
210210
expect(image_optim.send(list_method, test_images)).to eq(results)
@@ -217,7 +217,7 @@ def temp_copy(image)
217217
image_optim = ImageOptim.new
218218
results = test_images.map do |src|
219219
dst = double
220-
expect(image_optim).to receive(method).with(src).and_return(dst)
220+
allow(image_optim).to receive(method).with(src).and_return(dst)
221221
[src, dst, :test]
222222
end
223223
expect(image_optim.send(list_method, test_images) do |src, dst|

0 commit comments

Comments
 (0)