We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4c842e commit 9586486Copy full SHA for 9586486
spec/run_spec.cr
@@ -15,12 +15,20 @@ end
15
16
describe "Run" do
17
it "runs a code block after starting" do
18
- run(<<-CR).should eq "started\nstopped\n"
+ run(<<-CR).should contain("started")
19
+ Kemal.config.env = "test"
20
+ Kemal.run do
21
+ log "started"
22
+ end
23
+ CR
24
25
+
26
+ it "runs a code block after stopping" do
27
+ run(<<-CR).should contain("stopped")
28
Kemal.config.env = "test"
29
Kemal.run do
- puts "started"
30
Kemal.stop
- puts "stopped"
31
+ log "stopped"
32
end
33
CR
34
@@ -29,7 +37,7 @@ describe "Run" do
37
run(<<-CR).should contain "[test] Kemal is running in test mode."
38
39
Kemal.run
- puts Kemal.config.running
40
+ Kemal.config.running
41
42
35
43
0 commit comments