Skip to content

Commit

Permalink
Stop exporting runRestyler_
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Jul 26, 2024
1 parent 5f87509 commit 25562a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/Restyler/Restyler/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module Restyler.Restyler.Run

-- * Exported for testing only
, runRestyler
, runRestyler_
, withFilteredPaths
, findFiles
) where
Expand Down
5 changes: 3 additions & 2 deletions test/Restyler/Restyler/RunSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ spec = withTestApp $ do

filtered `shouldBe` Just (["a", "b"] :| [["a"]])

describe "runRestyler_" $ do
describe "runRestyler" $ do
it "treats non-zero exit codes as RestylerExitFailure"
$ testAppExample
$ do
pendingWith "The separate docker-pull process fails first now"
config <- loadDefaultConfig
local (\x -> x {taProcessExitCodes = ExitFailure 99}) $ do
runRestyler_ (someRestyler "foo") ["bar"]
runRestyler config (someRestyler "foo") ["bar"]
`shouldThrow` ( ==
RestylerExitFailure
(someRestyler "foo")
Expand Down
2 changes: 2 additions & 0 deletions test/SpecHelper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import LoadEnv (loadEnvFrom)
import Restyler.AnnotatedException
import Restyler.Config
import Restyler.Docker
import Restyler.Git
import Restyler.Local.Options
import Restyler.Options.FailOnDifferences
import Restyler.Options.HostDirectory
Expand Down Expand Up @@ -99,6 +100,7 @@ newtype TestAppT a = TestAppT
, MonadLogger
, MonadReader TestApp
)
deriving (MonadGit) via (NullGit TestAppT)
deriving (MonadDocker) via (NullDocker TestAppT)

instance MonadSystem TestAppT where
Expand Down

0 comments on commit 25562a3

Please sign in to comment.