mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
21 lines
314 B
Crystal
21 lines
314 B
Crystal
|
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
|