Skip to content

Commit

Permalink
Attempt to fix Testing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
amitaibu committed Oct 10, 2021
1 parent ea28eb0 commit 44bcc34
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Guide/testing.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Test.Hspec
import IHP.Test.Mocking
import IHP.FrameworkConfig (ConfigBuilder(..))
import IHP.Prelude
import IHP.QueryBuilder (fetch, query)
import IHP.QueryBuilder (query)

import Web.Types
import Web.Routes
Expand Down Expand Up @@ -74,24 +74,24 @@ For more details on how to structure test suites see the [Hspec manual](http://h
The following is a complete example of the above code:

```haskell
module ExampleSpec where
module Web.Controller.ExampleSpec where

import Network.HTTP.Types.Status (status200)

import Test.Hspec
import IHP.Test.Controller.Mocking
import IHP.Test.Mocking
import IHP.FrameworkConfig (ConfigBuilder(..))
import IHP.Prelude
import IHP.QueryBuilder (fetch, query)
import IHP.QueryBuilder (query)

import Web.Types
import Web.Routes
import Generated.Types
import Main ()

-- a function like this probably already exists in your Config module:
makeConfig :: IO ConfigBuilder
makeConfig = ...
-- makeConfig :: IO ConfigBuilder
-- makeConfig = ...

spec :: Spec
spec = beforeAll (makeConfig >>= mockContext WebApplication) do
Expand Down

0 comments on commit 44bcc34

Please sign in to comment.