Persisting underscore in Assertions
warwickfoster opened this issue · 2 comments
warwickfoster commented
context[$"processing file - \"{file.Name}\""] = () =>{}
I would like to persist the underscores in the filename so would like to escape out the underscore as follows:
context[$"processing file - \"{file.Name.Replace("_","\\")}\""] = () => {}
Any options?
BrainCrumbz commented
Hi there. Do you mean something like this?
public class describe_underscore_in_context : nspec
{
void Given_nested_context_name_has_underscores()
{
context["This_nested_context will lose underscores"] = () =>
{
it["Should pass"] = () => true.ShouldBeTrue();
};
context["This\\_nested\\_context will keep underscores"] = () =>
{
it["Should pass"] = () => true.ShouldBeTrue();
};
}
}
amirrajan commented
There is a Conventions
concept have baked in NSpec