@@ -38,20 +38,21 @@ On Windows, it will complain about:
38
38
39
39
On OS X and Linux, the error will be something like:
40
40
41
+
41
42
# Running:
42
43
43
- ESS
44
+ E
44
45
45
- Finished in 0.001539s, 2599.0903 runs/s, 0.0000 assertions/s.
46
+ Finished in 0.001328s, 753.0121 runs/s, 0.0000 assertions/s.
46
47
47
- 1) Error:
48
- HelloWorldTest#test_no_name :
48
+ 1) Error:
49
+ HelloWorldTest#test_say_hi :
49
50
NameError: uninitialized constant HelloWorldTest::HelloWorld
50
- hello-world/hello_world_test.rb:20:in `test_no_name'
51
-
52
- 3 runs, 0 assertions, 0 failures, 1 errors, 2 skips
53
-
54
- You have skipped tests. Run with --verbose for details.
51
+ Did you mean? HelloWorldTest
52
+ hello_world_test.rb:19:in `test_say_hi'
53
+
54
+ 1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
55
+
55
56
56
57
Within the first test, we are referencing a constant named ` HelloWorld ` when
57
58
we say ` HelloWorld.hello ` . When Ruby sees a capitalized name like
@@ -69,19 +70,6 @@ To fix it, open up the hello_world.rb file and add the following code:
69
70
class HelloWorld
70
71
end
71
72
72
- ### Understanding Test Failures
73
-
74
- Whether you are on Windows, Mac OS X or Linux, you will eventually be faced with
75
- errors and failures that look a lot like the Mac OS X / Linux error above.
76
-
77
- The letters ` ESS ` show that there are three tests altogether,
78
- that one of them has an error (` E ` ), and that two of them are skipped (` SS ` ).
79
-
80
- The goal is to have three passing tests, which will show as three dots: ` ... ` .
81
-
82
- The tests are run in randomized order, which will cause the letters to display
83
- in random order as well.
84
-
85
73
## Step 3
86
74
87
75
Run the test again.
@@ -131,17 +119,6 @@ out what went wrong, and then try again.
131
119
132
120
If it passes, then you're ready to move to the next step.
133
121
134
- Open the hello_world_test.rb file, and find the word "skip". All but the first test
135
- start with "skip", which tells Minitest to ignore the test. This is so that
136
- you don't have to deal with all the failures at once.
137
-
138
- To activate the next test, delete the "skip", and run the test suite again.
139
-
140
- ## Wash, Rinse, Repeat
141
-
142
- Delete one "skip" at a time, and make each test pass before you move to the
143
- next one.
144
-
145
122
## Submit
146
123
147
124
When everything is passing, you can submit your code with the following
0 commit comments