Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebuggerShim.cs missing using statement for NSpec.Assertions #172

Closed
BennieCopeland opened this issue Mar 20, 2017 · 7 comments
Closed

DebuggerShim.cs missing using statement for NSpec.Assertions #172

BennieCopeland opened this issue Mar 20, 2017 · 7 comments

Comments

@BennieCopeland
Copy link
Contributor

Installing the NSpec package into a new .Net 4.6.2 console application, I get an error on line 47 that 'bool' does not contain a definition for 'ShouldBeTrue' and no extension method 'ShouldBeTrue' accepting a first argument of type 'bool' could be found Adding the NSpec.Assertions namespace fixes the issue.

@amirrajan
Copy link
Collaborator

Thanks for the heads up. Definitely want to make sure the install process is smooth.

@BrainCrumbz
Copy link
Collaborator

There's an open issue, #161 , tracking a difference in what's reported in website docs and what assertions are actually available.

When you say "on line 47", which code are you referring to? Was that created out of a template, or....? Thanks for your contribution.

@amirrajan
Copy link
Collaborator

amirrajan commented Mar 21, 2017

I updated the "hello world" code on the website. That one should work, but I still need to work through all the other ones and make sure they work with the latest version of NSpec

@BrainCrumbz
Copy link
Collaborator

Just inspected the sample class generated with dotnet new nspectest and that has the right using NSpec.Assertions; as well, so it should be ok.

@BrainCrumbz
Copy link
Collaborator

@amirrajan re. updating example code, just a reminder that with FluentAssertions for basic comparisons one can go with Should().Be(...), which might (?) look more immediate than ShouldBeEquivalentTo(...)

@BennieCopeland
Copy link
Contributor Author

BennieCopeland commented Mar 21, 2017 via email

@BrainCrumbz
Copy link
Collaborator

Gosh, that was right in issue title! :O Sorry for not noticing it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants