mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add spec for GitHub issue 47
https://github.com/icy-arctic-fox/spectator/issues/47
This commit is contained in:
parent
e9d3f31ac3
commit
2516803b0d
1 changed files with 18 additions and 0 deletions
18
spec/issues/github_issue_47_spec.cr
Normal file
18
spec/issues/github_issue_47_spec.cr
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
require "../spec_helper"
|
||||||
|
|
||||||
|
Spectator.describe "GitHub Issue #47" do
|
||||||
|
class Original
|
||||||
|
def foo(arg1, arg2)
|
||||||
|
# ...
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
mock Original
|
||||||
|
|
||||||
|
let(fake) { mock(Original) }
|
||||||
|
|
||||||
|
specify do
|
||||||
|
expect(fake).to receive(:foo).with("arg1", arg2: "arg2")
|
||||||
|
fake.foo("arg1", "arg2")
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue