Commit 6878df5
committed
Provide a better example of how to stub a helper method in a view spec
When I upgraded to Rails 3.0.9 I ran into an issue where
controller.singleton_class.class_eval was leaving behind cruft for
other tests to run into.
We exploit the fact that helper methods are imported into the view class
to stub those helpers.1 parent 95dac95 commit 6878df5
1 file changed
+2
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
| 150 | + | |
157 | 151 | | |
158 | 152 | | |
159 | 153 | | |
| |||
0 commit comments