Skip to content

Commit 9586486

Browse files
committed
Update run_spec to respect latest Log change
1 parent d4c842e commit 9586486

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

spec/run_spec.cr

+12-4
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,20 @@ end
1515

1616
describe "Run" do
1717
it "runs a code block after starting" do
18-
run(<<-CR).should eq "started\nstopped\n"
18+
run(<<-CR).should contain("started")
19+
Kemal.config.env = "test"
20+
Kemal.run do
21+
log "started"
22+
end
23+
CR
24+
end
25+
26+
it "runs a code block after stopping" do
27+
run(<<-CR).should contain("stopped")
1928
Kemal.config.env = "test"
2029
Kemal.run do
21-
puts "started"
2230
Kemal.stop
23-
puts "stopped"
31+
log "stopped"
2432
end
2533
CR
2634
end
@@ -29,7 +37,7 @@ describe "Run" do
2937
run(<<-CR).should contain "[test] Kemal is running in test mode."
3038
Kemal.config.env = "test"
3139
Kemal.run
32-
puts Kemal.config.running
40+
Kemal.config.running
3341
CR
3442
end
3543

0 commit comments

Comments
 (0)