Add support for any_args in DSL

This commit is contained in:
Michael Miller 2022-07-12 19:05:55 -06:00
parent 4aaa8db5e2
commit 3d7655a5d1
No known key found for this signature in database
GPG key ID: 32B47AE8F388A1FF
9 changed files with 32 additions and 12 deletions

View file

@ -103,4 +103,14 @@ Spectator.describe "Stub DSL", :smoke do
end
end
end
describe "#any_args" do
it "defines a stub with no arguments constraint" do
allow(dbl).to receive(:foo).with(any_args).and_return(5)
aggregate_failures do
expect(dbl.foo).to eq(5)
expect(dbl.foo(0)).to eq(5)
end
end
end
end