Update README.md
This commit is contained in:
parent
11157d2484
commit
6df7caca0a
1 changed files with 4 additions and 4 deletions
|
@ -44,12 +44,14 @@ Kemal.run
|
||||||
|
|
||||||
Now you can easily test your `Kemal` application in your `spec`s.
|
Now you can easily test your `Kemal` application in your `spec`s.
|
||||||
|
|
||||||
|
```
|
||||||
|
KEMAL_ENV=test crystal spec
|
||||||
|
```
|
||||||
|
|
||||||
```crystal
|
```crystal
|
||||||
# spec/your-kemal-app-spec.cr
|
# spec/your-kemal-app-spec.cr
|
||||||
|
|
||||||
describe "Your::Kemal::App" do
|
describe "Your::Kemal::App" do
|
||||||
# Be sure to start your app in test mode
|
|
||||||
start
|
|
||||||
|
|
||||||
# You can use get,post,put,patch,delete to call the corresponding route.
|
# You can use get,post,put,patch,delete to call the corresponding route.
|
||||||
it "renders /" do
|
it "renders /" do
|
||||||
|
@ -57,8 +59,6 @@ describe "Your::Kemal::App" do
|
||||||
response.body.should eq "Hello World!"
|
response.body.should eq "Hello World!"
|
||||||
end
|
end
|
||||||
|
|
||||||
# Be sure to stop your app after the specs
|
|
||||||
stop
|
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue