Merge master into release/0.10

This commit is contained in:
Michael Miller 2021-07-05 11:32:45 -06:00
parent 8d32984eba
commit 6a01ab3531
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD
8 changed files with 111 additions and 19 deletions

View file

@ -0,0 +1,19 @@
require "../spec_helper"
Spectator.describe "GitHub Issue #28" do
class Test
def foo
42
end
end
mock Test do
stub foo
end
it "matches method stubs with no_args" do
test = Test.new
expect(test).to receive(:foo).with(no_args).and_return(42)
test.foo
end
end

View file

@ -0,0 +1,20 @@
require "../spec_helper"
Spectator.describe "GitHub Issue #29" do
class SomeClass
def goodbye
exit 0
end
end
mock SomeClass do
stub exit(code)
end
describe SomeClass do
it "captures exit" do
expect(subject).to receive(:exit).with(0)
subject.goodbye
end
end
end

View file

@ -0,0 +1,9 @@
require "../spec_helper"
Spectator.describe "GitHub Issue #30" do
let(dbl) { double(:foo) }
it "supports block-less symbol doubles" do
expect(dbl).to_not be_nil
end
end