Closed dhilgarth closed 6 years ago
Does specify
work?
No
😲 @BrainCrumbz
@dhilgarth could you please double check either the version, or where are you getting should_be
from?
Those assertion helpers where available in older NSpec versions, and documentation has not been updated yet. In most recent versions the number of assertions shipped with NSpec has been drastically reduced to only those available under NSpec/Assertions/AssertionExtensions, in favour of importing your own preferred assertion library.
Just to mention, examples found in NSpec/examples/ directory use Shouldly.
I understand this behaviour is strange, but that would be the first thing I'd check.
Second check: how are you running the test? From NSpecRunner command line tool? Or Visual Studio? Which version with which tool, in case? HTH
Ehm, that's right, I was using v1.0.7. I installed NSpec.VsAdapter and didn't realize that it didn't depend on the latest nspec. I later removed NSpec.VsAdapter but never verified that I was using the latest NSpec version. Thanks for the hint!
Glad you made it work!
Actually you can use NSpec.VsAdapter (in VS2013/15 as an extension, and in VS2017 as a package) even with the latest NSpec version.
@dhilgarth thanks for the heart attack :-P
So sorry :grimacing:
According to the documentation, the following code should work:
But it doesn't. It doesn't pick up the assertions.