-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsite.html
More file actions
72 lines (70 loc) · 5.2 KB
/
site.html
File metadata and controls
72 lines (70 loc) · 5.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<p><img style="float: left; margin: 5px;" src="themes/contoso/content/images/icon.png" alt="" /></p>
<p style="font-size: 1.2em;">SpecWatchr allows you to employ continuous testing with NSpec. SpecWatchr automatically runs impacted tests as you develop. It keeps you from breaking your concentration while you are developing your application. Ruby 1.9.2 is and the Watchr gem is needed to run SpecWatchr. Instructions to get SpecWatchr working follow, let's start with a demo first (if you haven't done so already, it's probably a good idea for you to <a href="http://nspec.org">familiarize yourself with NSpec</a> first):</p>
<div style="margin-left: 22px;">
<object width="840" height="530" id="scPlayer">
<param name="movie" value="http://content.screencast.com/users/Aikr473/folders/Default/media/e4ce307c-e4c7-44aa-8343-5a7504c573fb/mp4h264player.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#FFFFFF" />
<param name="flashVars" value="thumb=http://content.screencast.com/users/Aikr473/folders/Default/media/e4ce307c-e4c7-44aa-8343-5a7504c573fb/FirstFrame.jpg&containerwidth=1920&containerheight=1160&content=http://content.screencast.com/users/Aikr473/folders/Default/media/e4ce307c-e4c7-44aa-8343-5a7504c573fb/Prime_Factors_in_NSpec.mp4&blurover=false" />
<param name="allowFullScreen" value="true" />
<param name="scale" value="showall" />
<param name="allowScriptAccess" value="always" />
<param name="base" value="http://content.screencast.com/users/Aikr473/folders/Default/media/e4ce307c-e4c7-44aa-8343-5a7504c573fb/" /> <iframe src="http://www.screencast.com/users/Aikr473/folders/Default/media/e4ce307c-e4c7-44aa-8343-5a7504c573fb/embed" frameborder="0" width="1920" height="1160" scrolling="no"></iframe>
</object>
</div>
<div class="zone zone-sub-page-title">
<h1>Getting Started</h1>
</div>
<div id="layout-content" class="group" style="padding-top: 10px;">
<h2>Installing SpecWatchr</h2>
<p>This tutorial will walk you through installing SpecWatchr (and all it's related bits).</p>
<ol>
<li>Install <a href="http://www.ruby-lang.org/en/downloads/" target="_blank">Ruby 1.9.2 for Windows</a></li>
<li>Install the <a href="http://rubygems.org/gems/watchr" target="_blank">watchr ruby gem</a></li>
<li>Install <a href="#" target="_blank">Growl For Windows</a></li>
<li>This is a really nice Growl Theme that's worth installing: <a href="http://www.softwarebakery.com/frozencow/translucentdark.xml" target="_blank">Translucent Dark</a></li>
<li>Ensure that you have <a href="http://nuget.org/" target="_blank">NuGet</a> installed.</li>
<li>Create a blank solution.</li>
<li>Create a <strong>.Net 4.0</strong> class library the ends with one of the following<strong>Test, Tests, Spec, or Specs...eg: "MyApp.UnitTests".</strong></li>
<li>Open the Package Manager Console and type the following commands:
<div class="commandWrapper">
<div class="commandPrompt">
<p class="command">PM> Install-Package nspec</p>
</div>
</div>
<div class="commandWrapper">
<div class="commandPrompt">
<p class="command">PM> Install-Package specwatchr</p>
</div>
</div>
</li>
<li>After installations completes, create a class called describe_FirstTest.cs with the following content (build the solution to make sure you didn't make an errors):</li>
</ol>
<pre class="brush: csharp;">using NSpec;
class describe_FirstTest : nspec
{
void given_the_world_has_not_come_to_an_end()
{
it["Hello World should be Hello World"] = () => "Hello World".should_be("Hello World");
}
}</pre>
<br/>
<br/>
<h2>Important Stuff</h2>
<p>When you ran <strong>Install-Package specwatchr</strong>, a few ruby files got placed in your solution directory:</p>
<h3>dotnet.watchr.rb</h3>
<p>The file named <strong>dotnet.watchr.rb is your configuration file for specwatchr</strong>. Open it up in your favorite text editor to see configuration options (if you are using NSpec via Nuget, you shouldn't have to change anything in the configuration file).</p>
<h3>watchr_dot_net.rb</h3>
<p>This file contains all of the source for specwatchr. Anything you may want to tweek or customize can be done in this file (you'll find that you may want to customize specwatchr to fit your solution need once you get more familiar with what the code does).<p>
<h2>Running SpecWatchr</h2>
<p>Now that you have SpecWatchr installed and you know what source executes, we can start it up and watch the magic happen.</p>
<ol>
<li>The solution that you created with the steps above should be open (make sure you build it once just so we know we are at a good place).</li>
<li>Run Growl for Windows (keep in mind that dotnet.watchr.rb has a Growl Path defined, be sure to double check this path and make sure it matches your install path)</li>
<li>Have we mentioned that the Translucent Dark display for Growl is really nice?</li>
<li>Run "Start Command Prompt with Ruby" (it should have been added to your start menu when you installed Ruby 1.9.2)</li>
<li>Navigate to the solution directory for the project you created in the above tests (via command prompt).</li>
<li>Run the following command: <strong>watchr dotnet.watchr.rb</strong></li>
<li>Now that specwatchr is fired up, save describe_FirstTest.cs (specwatchr will execute and should Growl that all tests are passing).</li>
</ol>
</div>