mitchellwrosen / tasty-hspec

Hspec provider for tasty
Other
14 stars 10 forks source link

Upper bound for hspec #8

Closed markus1189 closed 9 years ago

markus1189 commented 9 years ago

hspec 2.2.0 changes the Fail constructor to take one argument more (Maybe Location):

Before:

-- | The result of running an example
data Result = Success | Pending (Maybe String) | Fail String
  deriving (Eq, Show, Read, Typeable)

After:

-- | The result of running an example
data Result = Success | Pending (Maybe String) | Fail (Maybe Location) String
  deriving (Eq, Show, Read, Typeable)

This leads to build failures like this:

    Test/Tasty/Hspec.hs:53:27:
        Constructor ‘H.Fail’ should have 2 arguments, but has been given 1
        In the pattern: H.Fail str
        In an equation for ‘hspecResultToTastyResult’:
            hspecResultToTastyResult (H.Fail str) = T.testFailed str

For now, I changed the upper bound for hspec (, hspec >=2 && <2.2) and bumped the version to 1.1.1. I guess it's worth a thought if we also need a bound on hspec-core but for now this seems to be sufficient as-is.

Best, Markus

mitchellwrosen commented 9 years ago

Thanks Markus.

mitchellwrosen commented 9 years ago

1.1.1 uploaded to hackage

markus1189 commented 9 years ago

Awesome :) On Aug 22, 2015 8:17 PM, "Mitchell Rosen" notifications@github.com wrote:

1.1.1 uploaded to hackage

— Reply to this email directly or view it on GitHub https://github.com/mitchellwrosen/tasty-hspec/pull/8#issuecomment-133736787 .