forked from nspec/NSpec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbefore.txt
327 lines (288 loc) · 10.4 KB
/
before.txt
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
app config detection
it finds app config
describe after
it is one
it is still just one
given a subcontext that fails
when totaling failures
should count this failure - FAILED - Expected: 2, But was: 1
VendingMachineSpec
given new vending machine
machine Items should be empty
getting item A1 should throw ItemNotRegistered
given doritos are registered in A1 for 50 cents
machine Items Count should be Convert 1
machine Item A1 Name should be doritos
machine Item A1 Price should be Convert 0 5
given a second item is registered
machine Items Count should be Convert 2
action indexer approach
a user
user Id should not be default
user Admin should be false
should work
user is admin
user Admin should be true
user is terminated
user Terminated should be true
grandparents run first
describe NSpec
something that works in rspec but not nspec
sibling context
ints Count should be Convert 1 - FAILED - Expected: 1, But was: 2
another sibling context
ints Count should be Convert 1 - FAILED - Expected: 1, But was: 2
before each on the class level
it should run before on class level
ints Count should be Convert 1
describe TicTacToeGame
when players try to take the same square
should throw exception
describe a finished TicTacToeGame
describe a draw
all squares taken with no 3 in a row
game Finished should be true
game Draw should be true
describe a winning game
3 x's in column 0
game Finished should be true
winner should be x
3 x's in row 0
game Finished should be true
winner should be x
3 o's in column 0
game Finished should be true
winner should be o
3 o's in row 0
game Finished should be true
winner should be o
3 x's in column 1
game Finished should be true
winner should be x
3 x's in row 1
game Finished should be true
winner should be x
3 o's in column 1
game Finished should be true
winner should be o
3 o's in row 1
game Finished should be true
winner should be o
3 x's in column 2
game Finished should be true
winner should be x
3 x's in row 2
game Finished should be true
winner should be x
3 o's in column 2
game Finished should be true
winner should be o
3 o's in row 2
game Finished should be true
winner should be o
3 x's left to right
game Finished should be true
winner should be x
3 x's right to left
game Finished should be true
winner should be x
3 o's left to right
game Finished should be true
winner should be o
3 o's right to left
game Finished should be true
winner should be o
describe Extensions
when creating ranges
1.To(2) should be [1,2]
describe Flatten
["fifty","two"] should be fiftytwo
describe shoulds
given a non empty list
should not be empty
describe tags
tags at context level
when tags are specified at the context level
tags all examples within that context
when tags are nested
tags all the nested examples and nested contexts cumlatively
prime kata
prime factors
1 should be []
2 should be [2]
3 should be [3]
4 should be [2,2]
5 should be [5]
6 should be [2,3]
7 should be [7]
8 should be [2,2,2]
9 should be [3,3]
describe batman sound effects as text
they are loud and emphatic
given bam
should be BAM!!!
given whack
should be WHACK!!!
describe class level
specify given befores and acts run in the correct sequence
describe car
describe fuel requirements
car has 10 gallon tank
tank is empty
car IsOnEmpty should be true
turning car on
car does not have gas
car IsRunning should be false
car has gas
car IsRunning should be true
10% of gas is left
car IsLowOnFuel should be true
less than 10% of gas is left
car IsLowOnFuel should be true
more than 10% of gas is left
car IsLowOnFuel should be false
describe compression ratio
car has compression ratio of 7 to 1
should have octane requirement of 87
should have brake thermal efficiency of 28%
car has compression ratio of 8 to 1
should have octane requirement of 92
should have brake thermal efficiency of 30%
car has compression ratio of 9 to 1
should have octane requirement of 96
should have brake thermal efficiency of 32%
when driving car
should throw error if car isn't started
with 10 gallon(s) of gas, mpg: 1, driving: 10 miles
should have made it 10 miles
should have 0 gallons left in tank
should not be running
should have low fuel
with 10 gallon(s) of gas, mpg: 2, driving: 5 miles
should have made it 5 miles
should have 7.5 gallons left in tank
should be running
should not have low fuel
with 10 gallon(s) of gas, mpg: 10, driving: 10 miles
should have made it 10 miles
should have 9 gallons left in tank
should be running
should not have low fuel
describe expected exception
given a null string
should throw null-ref
describe helpers
when making tea
that is 210 degrees
should be hot
that is 90 degrees
should be cold
describe method level examples
it should run methods that start with IT as an assertion
specify that methods that start with SPECIFY should run as assertion
given the sequence starts with 1
given the sequence continues with 2
given the sequence continues with 3
sequence should be "123"
describe Math
verify strictly increasing numbers
2 should be greater than 1
3 should be greater than 2
4 should be greater than 3
5 should be greater than 4
6 should be greater than 5
7 should be greater than 6
8 should be greater than 7
9 should be greater than 8
describe pending
when creating pending specifications
pending spec - PENDING
"" should be "something else" - PENDING
describe PrimeFactors
when determining prime factors
0 should be []
1 should be []
2 should be [2]
3 should be [3]
4 should be [2,2]
5 should be [5]
6 should be [2,3]
7 should be [7]
8 should be [2,2,2]
9 should be [3,3]
describe specifications
when creating specifications
true should be false - FAILED - Expected: False, But was: True
enumerable should be empty
enumerable should contain 1
enumerable should not contain 1 - FAILED - Expected: not collection containing 1, But was: < 1 >
1 should be 2 - FAILED - Expected: 2, But was: 1
1 should be 1
1 should not be 1 - FAILED - Expected: not 1, But was: 1
1 should not be 2
"" should not be null
some object should not be null - FAILED - Expected: not null, But was: null
ninja should not be pirate
multiple befores
list manipulation
the ints collection should not be null
one item in list
should have 1 item in list
should contain the number 99
another item in list
should have 2 items in list
should contain the number 26
describe VendingMachine
when stocking vending machine with chips
should contain chips with count of 1
multiple chips added
should increment chip inventory with count of 2
when buying an item
vending maching has inventory
should decrement inventory
should increment cash in machine
my first spec
given the world has not come to an end
Hello World should be Hello World
describe contexts
describe Account
when withdrawing cash
account is in credit
the Account dispenses cash
account is overdrawn
the Account does not dispense cash
describe before
they run before each example
number should be 2
number should be 1
SomeSharedSpec
when inherting from some shared spec
should still run tests
Test should be Test
**** FAILURES ****
nspec. given a subcontext that fails. when totaling failures. should count this failure.
Expected: 2, But was: 1
at SampleSpecs.Bug.given_a_subcontext_that_fails.<when_totaling_failures>b__0() in c:\Users\Administrator\Documents\Visual Studio 2010\Projects\NSpec\SampleSpecs\Bug\given_a_subcontext_that_fails.cs:line 13
nspec. grandparents run first. describe NSpec. something that works in rspec but not nspec. sibling context. ints Count should be Convert 1.
Expected: 1, But was: 2
at lambda_method(Closure )
nspec. grandparents run first. describe NSpec. something that works in rspec but not nspec. another sibling context. ints Count should be Convert 1.
Expected: 1, But was: 2
at lambda_method(Closure )
nspec. describe specifications. when creating specifications. true should be false.
Expected: False, But was: True
at describe_specifications.<when_creating_specifications>b__0() in c:\Users\Administrator\Documents\Visual Studio 2010\Projects\NSpec\SampleSpecs\WebSite\describe_specifications.cs:line 8
nspec. describe specifications. when creating specifications. enumerable should not contain 1.
Expected: not collection containing 1, But was: < 1 >
at describe_specifications.<when_creating_specifications>b__3() in c:\Users\Administrator\Documents\Visual Studio 2010\Projects\NSpec\SampleSpecs\WebSite\describe_specifications.cs:line 11
nspec. describe specifications. when creating specifications. 1 should be 2.
Expected: 2, But was: 1
at describe_specifications.<when_creating_specifications>b__4() in c:\Users\Administrator\Documents\Visual Studio 2010\Projects\NSpec\SampleSpecs\WebSite\describe_specifications.cs:line 12
nspec. describe specifications. when creating specifications. 1 should not be 1.
Expected: not 1, But was: 1
at describe_specifications.<when_creating_specifications>b__6() in c:\Users\Administrator\Documents\Visual Studio 2010\Projects\NSpec\SampleSpecs\WebSite\describe_specifications.cs:line 14
nspec. describe specifications. when creating specifications. some object should not be null.
Expected: not null, But was: null
at describe_specifications.<when_creating_specifications>b__9() in c:\Users\Administrator\Documents\Visual Studio 2010\Projects\NSpec\SampleSpecs\WebSite\describe_specifications.cs:line 17
148 Examples, 8 Failed, 2 Pending
(in C:/Users/Administrator/Documents/Visual Studio 2010/Projects/NSpec)