public
Description: rails plugin that enables inheritance of views along a controller class heirachy
Homepage: http://ianwhite.github.com/inherit_views
Clone URL: git://github.com/ianwhite/inherit_views.git
inherit_views / SPECDOC
100644 58 lines (46 sloc) 2.055 kb
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
 
AController < TestController; inherit_views (the class)
- should be inherit views
- should have inherit view paths == ['a']
 
AController < TestController; inherit_views (an instance)
- should be inherit views
- should have inherit view paths == ['a']
- GET :in_abc should render a/in_abc
- GET :in_a should render a/in_a
- GET :in_ab should render a/in_ab
 
BController < TestController; inherit_views 'a' (the class)
- should be inherit views
- should have inherit view paths == ['b', 'a']
 
BController < TestController; inherit_views 'a' (an instance)
- should be inherit views
- should have inherit view paths == ['b', 'a']
- GET :in_first should render a/in_a
- GET :in_ab should render b/in_ab
- GET :in_b should render b/in_b
- GET :in_abc should render b/in_abc
- GET :partial_in_bc should render b/partial_in_bc & b/_partial_in_bc
- GET :partial_in_b should render b/partial_in_b & b/_partial_in_b
- GET :collection_in_bc should render b/collection_in_bc then b/_partial_in_bc
 
CController < BController (the class)
- should be inherit views
- should have inherit view paths == ['c', 'b', 'a']
 
CController < BController (an instance)
- should be inherit views
- should have inherit view paths == ['c', 'b', 'a']
- GET :in_a should render a/in_a
- GET :in_ab should render b/in_ab
- GET :in_b should render b/in_b
- GET :in_abc should render c/in_abc
- GET :in_c should render c/in_c
- GET :partial_in_bc should render b/partial_in_bc then c/_partial_in_bc
- GET :partial_in_b should render b/partial_in_b & b/_partial_in_b
- GET :collection_in_bc should render b/collection_in_bc then c/_partial_in_bc
 
DController < AController; inherit_views 'other' (the class)
- should be inherit views
- should have inherit view paths == ['d', 'other', 'a']
 
DController < AController; inherit_views 'other' (an instance)
- should be inherit views
- should have inherit view paths == ['d', 'other', 'a']
 
NormalController
- GET :partial_from_c should render normal/partial_from_c, then c/_partial_in_bc
 
Finished in 0.348816 seconds
 
35 examples, 0 failures