Add no_args

This commit is contained in:
Michael Miller 2022-07-10 18:51:58 -06:00
parent b9eaefb424
commit 32a9bfd356
No known key found for this signature in database
GPG key ID: 32B47AE8F388A1FF
8 changed files with 29 additions and 11 deletions

View file

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