I'm struggling to set up NCrunch to run my nspec tests automatically. On the ncrunch forums it says this functionality has not been implemented yet, but then MattFlo says he prefers using NCrunch, so I'm pretty sure it can be made to work. Help would be greatly appreciated!
Asked
Active
Viewed 828 times
6
-
Waiting for an answer with you... – Cork Jun 28 '12 at 16:58
1 Answers
2
We are working on getting NCrunch fully supported.
For now you can use the DebuggerShim (it's a cs file included with NSpec) as a shim to run it via NCrunch. The DebuggerShim is pretty much an NUnit test that runs NSpec tests.
You may want to take a look at specwatchr. Matt likes to use NCruch, but I find that it's to eager to run my tests. I have to consciously STOP typing to give NCrunch a chance to run my tests...I'd rather just hit the save button and have a background process run my tests for me (ie specwatchr). Hope that helps.
Amir (Hacker on NSpec)
NUnit extension for NSpec: https://github.com/ddaysoftware/NSpec4NUnit

Amir
- 9,091
- 5
- 34
- 46
-
1I searched far and wide for a way to execute NSpec tests from within NUnit (right or wrong) and missed your answer until after I had spent some time digging through the NSpec source + github site. Let me upvote and do anything else I can to draw attention to your answer. A code sample might look like this: [Test] public void ExecuteNSpecAuthControllerTests() { // Arrange var shim = new DebuggerShim(); // Act / Assert shim.debug(); } – Dec 21 '12 at 20:46
-
@ardave I've added a Debugger Support section on NSpec.org in the Getting Started area. Hope that helps others. Feel free to send me a mention on twitter also. I'm quick to respond there. My twitter handle is amirrajan. – Amir Dec 26 '12 at 20:23
-
1I've created a plugin for NUnit that naturally executes nspec tests. See https://github.com/ddaysoftware/NSpec4NUnit. I'm still working on making it easy to install, but once installed has worked well for our teams. – Doug Sep 16 '13 at 22:11
-