Updated Rails to 2.1.0
[gitorious:georgyos-clone.git] / vendor / plugins / rspec / story_server / prototype / rspec_stories.html
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html 
3   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
4   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6   <head>
7     <title>Stories</title>
8     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9     <meta http-equiv="Expires" content="-1" />
10     <meta http-equiv="Pragma" content="no-cache" />
11     <script src="javascripts/prototype.js" type="text/javascript"></script>
12     <script src="javascripts/scriptaculous.js" type="text/javascript"></script>
13     <script src="javascripts/rspec.js" type="text/javascript"></script>
14     <link href="stylesheets/rspec.css" rel="stylesheet" type="text/css" />
15   </head>
16   <body>
17     <div id="container">
18       <dl class="story passed">
19         <dt>Story: autogenerated docstrings</dt>
20         <dd>
21           <p>
22             As an RSpec user<br />I want examples to generate their own names<br />So that I can reduce duplication between example names and example code
23           </p>
24           <dl class="passed">
25             <dt>Scenario: run passing examples with ruby</dt>
26             <dd>
27               <ul class="steps">
28                 <li class="passed">Given the file <span class="param">../../examples/pure/autogenerated_docstrings_example.rb</span></li>
29                 <li class="passed">When I run it with the <span class="param">ruby interpreter -fs</span></li>
30                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should equal 5/</span></li>
31                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should be < 5/</span></li>
32                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should include "a"/</span></li>
33                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should respond to #size/</span></li>
34               </ul>
35             </dd>
36           </dl>
37           <dl class="passed">
38             <dt>Scenario: run failing examples with ruby</dt>
39             <dd>
40               <ul class="steps">
41                 <li class="passed">Given the file <span class="param">../../failing_examples/failing_autogenerated_docstrings_example.rb</span></li>
42                 <li class="passed">When I run it with the <span class="param">ruby interpreter -fs</span></li>
43                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should equal 2/</span></li>
44                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should be > 5/</span></li>
45                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should include "b"/</span></li>
46                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should not respond to #size/</span></li>
47               </ul>
48             </dd>
49           </dl>
50           <dl class="passed">
51             <dt>Scenario: run passing examples with spec</dt>
52             <dd>
53               <ul class="steps">
54                 <li class="passed">Given the file <span class="param">../../examples/pure/autogenerated_docstrings_example.rb</span></li>
55                 <li class="passed">When I run it with the <span class="param">spec script -fs</span></li>
56                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should equal 5/</span></li>
57                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should be < 5/</span></li>
58                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should include "a"/</span></li>
59                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should respond to #size/</span></li>
60               </ul>
61             </dd>
62           </dl>
63           <dl class="passed">
64             <dt>Scenario: run failing examples with spec</dt>
65             <dd>
66               <ul class="steps">
67                 <li class="passed">Given the file <span class="param">../../failing_examples/failing_autogenerated_docstrings_example.rb</span></li>
68                 <li class="passed">When I run it with the <span class="param">spec script -fs</span></li>
69                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should equal 2/</span></li>
70                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should be > 5/</span></li>
71                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should include "b"/</span></li>
72                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/should not respond to #size/</span></li>
73               </ul>
74             </dd>
75           </dl>
76         </dd>
77       </dl>
78       <dl class="story passed">
79         <dt>Story: Spec::ExampleGroup with should methods</dt>
80         <dd>
81           <p>
82             As an RSpec adopter accustomed to classes and methods<br />I want to use should_* methods in an ExampleGroup<br />So that I use RSpec with classes and methods that look more like RSpec examples
83           </p>
84           <dl class="passed">
85             <dt>Scenario: Run with ruby</dt>
86             <dd>
87               <ul class="steps">
88                 <li class="passed">Given the file <span class="param">spec/example_group_with_should_methods.rb</span></li>
89                 <li class="passed">When I run it with the <span class="param">ruby interpreter</span></li>
90                 <li class="passed">Then the exit code should be <span class="param">256</span></li>
91                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"2 examples, 1 failure"</span></li>
92               </ul>
93             </dd>
94           </dl>
95           <dl class="passed">
96             <dt>Scenario: Run with spec</dt>
97             <dd>
98               <ul class="steps">
99                 <li class="passed">Given the file <span class="param">spec/example_group_with_should_methods.rb</span></li>
100                 <li class="passed">When I run it with the <span class="param">spec script</span></li>
101                 <li class="passed">Then the exit code should be <span class="param">256</span></li>
102                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"2 examples, 1 failure"</span></li>
103               </ul>
104             </dd>
105           </dl>
106         </dd>
107       </dl>
108       <dl class="story passed">
109         <dt>Story: Nested example groups</dt>
110         <dd>
111           <p>
112             As an RSpec user<br />I want to nest examples groups<br />So that I can better organize my examples
113           </p>
114           <dl class="passed">
115             <dt>Scenario: Run with ruby</dt>
116             <dd>
117               <ul class="steps">
118                 <li class="passed">Given the file <span class="param">../../examples/pure/stack_spec_with_nested_example_groups.rb</span></li>
119                 <li class="passed">When I run it with the <span class="param">ruby interpreter -fs</span></li>
120                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/Stack \(empty\)/</span></li>
121                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/Stack \(full\)/</span></li>
122               </ul>
123             </dd>
124           </dl>
125           <dl class="passed">
126             <dt>Scenario: Run with ruby</dt>
127             <dd>
128               <ul class="steps">
129                 <li class="passed">Given the file <span class="param">../../examples/pure/stack_spec_with_nested_example_groups.rb</span></li>
130                 <li class="passed">When I run it with the <span class="param">spec script -fs</span></li>
131                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/Stack \(empty\)/</span></li>
132                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/Stack \(full\)/</span></li>
133               </ul>
134             </dd>
135           </dl>
136         </dd>
137       </dl>
138       <dl class="story passed">
139         <dt>Story: Getting correct output</dt>
140         <dd>
141           <p>
142             As an RSpec user<br />I want to see output only once<br />So that I don't get confused
143           </p>
144           <dl class="passed">
145             <dt>Scenario: Run with ruby</dt>
146             <dd>
147               <ul class="steps">
148                 <li class="passed">Given the file <span class="param">spec/simple_spec.rb</span></li>
149                 <li class="passed">When I run it with the <span class="param">ruby interpreter</span></li>
150                 <li class="passed">Then the exit code should be <span class="param">0</span></li>
151                 <li class="passed">Then the <span class="param">stdout</span> should not match <span class="param">/\d+ tests, \d+ assertions, \d+ failures, \d+ errors/m</span></li>
152                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"1 example, 0 failures"</span></li>
153               </ul>
154             </dd>
155           </dl>
156           <dl class="passed">
157             <dt>Scenario: Run with CommandLine object</dt>
158             <dd>
159               <ul class="steps">
160                 <li class="passed">Given the file <span class="param">spec/simple_spec.rb</span></li>
161                 <li class="passed">When I run it with the <span class="param">CommandLine object</span></li>
162                 <li class="passed">Then the exit code should be <span class="param">0</span></li>
163                 <li class="passed">Then the <span class="param">stdout</span> should not match <span class="param">"Loaded suite"</span></li>
164                 <li class="passed">Then the <span class="param">stdout</span> should not match <span class="param">/\d+ tests, \d+ assertions, \d+ failures, \d+ errors/m</span></li>
165                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"1 example, 0 failures"</span></li>
166               </ul>
167             </dd>
168           </dl>
169           <dl class="passed">
170             <dt>Scenario: Tweak backtrace</dt>
171             <dd>
172               <ul class="steps">
173                 <li class="passed">Given the file <span class="param">stories/failing_story.rb</span></li>
174                 <li class="passed">When I run it with the <span class="param">ruby interpreter</span></li>
175                 <li class="passed">Then the <span class="param">stdout</span> should not match <span class="param">/\/lib\/spec\//</span></li>
176               </ul>
177             </dd>
178           </dl>
179         </dd>
180       </dl>
181       <dl class="story passed">
182         <dt>Story: Spec and test together</dt>
183         <dd>
184           <p>
185             As an RSpec adopter with existing Test::Unit tests<br />I want to run a few specs alongside my existing Test::Unit tests<br />So that I can experience a smooth, gradual migration path
186           </p>
187           <dl class="passed">
188             <dt>Scenario: Run with ruby</dt>
189             <dd>
190               <ul class="steps">
191                 <li class="passed">Given the file <span class="param">test/spec_and_test_together.rb</span></li>
192                 <li class="passed">When I run it with the <span class="param">ruby interpreter -fs</span></li>
193                 <li class="passed">Then the exit code should be <span class="param">256</span></li>
194                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"ATest"</span></li>
195                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"Test::Unit::AssertionFailedError in 'An Example should fail with assert'"</span></li>
196                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"'An Example should fail with should' FAILED"</span></li>
197                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"10 examples, 6 failures"</span></li>
198                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/expected: 40,\s*got: 4/m</span></li>
199                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/expected: 50,\s*got: 5/m</span></li>
200               </ul>
201             </dd>
202           </dl>
203           <dl class="passed">
204             <dt>Scenario: Run with spec</dt>
205             <dd>
206               <ul class="steps">
207                 <li class="passed">Given the file <span class="param">test/spec_and_test_together.rb</span></li>
208                 <li class="passed">When I run it with the <span class="param">spec script -fs</span></li>
209                 <li class="passed">Then the exit code should be <span class="param">256</span></li>
210                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"Test::Unit::AssertionFailedError in 'An Example should fail with assert'"</span></li>
211                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"'An Example should fail with should' FAILED"</span></li>
212                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"10 examples, 6 failures"</span></li>
213                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/expected: 40,\s*got: 4/m</span></li>
214                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">/expected: 50,\s*got: 5/m</span></li>
215               </ul>
216             </dd>
217           </dl>
218         </dd>
219       </dl>
220       <dl class="story passed">
221         <dt>Story: Test::Unit::TestCase extended by rspec with should methods</dt>
222         <dd>
223           <p>
224             As an RSpec adopter with existing Test::Unit tests<br />I want to use should_* methods in a Test::Unit::TestCase<br />So that I use RSpec with classes and methods that look more like RSpec examples
225           </p>
226           <dl class="passed">
227             <dt>Scenario: Run with ruby</dt>
228             <dd>
229               <ul class="steps">
230                 <li class="passed">Given the file <span class="param">test/test_case_with_should_methods.rb</span></li>
231                 <li class="passed">When I run it with the <span class="param">ruby interpreter</span></li>
232                 <li class="passed">Then the exit code should be <span class="param">256</span></li>
233                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"5 examples, 3 failures"</span></li>
234               </ul>
235             </dd>
236           </dl>
237           <dl class="passed">
238             <dt>Scenario: Run with spec</dt>
239             <dd>
240               <ul class="steps">
241                 <li class="passed">Given the file <span class="param">test/test_case_with_should_methods.rb</span></li>
242                 <li class="passed">When I run it with the <span class="param">spec script</span></li>
243                 <li class="passed">Then the exit code should be <span class="param">256</span></li>
244                 <li class="passed">Then the <span class="param">stdout</span> should match <span class="param">"5 examples, 3 failures"</span></li>
245               </ul>
246             </dd>
247           </dl>
248         </dd>
249       </dl>
250       <ul id="stock_steps" style="display: none;">
251         <li>I run it with the $interpreter</li>
252         <li>the $stream should match $regex</li>
253         <li>the $stream should not match $regex</li>
254         <li>the exit code should be $exit_code</li>
255         <li>the file $relative_path</li>
256       </ul>
257     </div>
258   </body>
259 </head>