Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit ffc4583

Browse files
committed
fix ruby 1.8 syntax error
1 parent 5aa1a35 commit ffc4583

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/rspec/mocks/and_invoke_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ module Mocks
2222
let(:callable) { lambda { nil } }
2323

2424
it 'raises ArgumentError' do
25-
expect { allow(obj).to receive(:foo).and_invoke(non_callable) }
26-
.to raise_error(ArgumentError, "Arguments to `and_invoke` must be callable.")
27-
expect { allow(obj).to receive(:foo).and_invoke(callable, non_callable) }
28-
.to raise_error(ArgumentError, "Arguments to `and_invoke` must be callable.")
25+
error = [ArgumentError, "Arguments to `and_invoke` must be callable."]
26+
27+
expect { allow(obj).to receive(:foo).and_invoke(non_callable) }.to raise_error(*error)
28+
expect { allow(obj).to receive(:foo).and_invoke(callable, non_callable) }.to raise_error(*error)
2929
end
3030
end
3131

0 commit comments

Comments
 (0)