Commit a3df05f
committed
Use selection factory in selection_spec
We've defined the answer_settings in the factory to use Struct rather
than OpenStruct for the answer_settings to better mock the behaviour
of ActiveResouce::Base which raises a NoMethodError when trying to
access attributes that don't exist.
Use the factory so we don't need to define this behaviour in multiple
places.1 parent 049b44f commit a3df05f
File tree
3 files changed
+22
-26
lines changed- spec
- components/question/selection_component
- factories/models/question
- models/question
3 files changed
+22
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | 9 | | |
18 | 10 | | |
19 | 11 | | |
| |||
309 | 301 | | |
310 | 302 | | |
311 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
312 | 309 | | |
313 | 310 | | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | 311 | | |
320 | 312 | | |
321 | 313 | | |
| |||
491 | 483 | | |
492 | 484 | | |
493 | 485 | | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
498 | 489 | | |
499 | 490 | | |
| 491 | + | |
| 492 | + | |
500 | 493 | | |
501 | 494 | | |
502 | 495 | | |
| |||
517 | 510 | | |
518 | 511 | | |
519 | 512 | | |
520 | | - | |
521 | | - | |
522 | | - | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
523 | 519 | | |
524 | 520 | | |
525 | 521 | | |
| |||
0 commit comments