ianwhite / response_for

response for lets you decorate your actions respond_to blocks

This URL has Read+Write access

response_for / SPECDOC
570f798d » ian 2007-10-23 response_for: initial release 1
3b1ae5e4 » ianwhite 2008-09-13 API change and rewrite. Va... 2 DefaultRailsBehaviourSpec::TheController GET :two_respond_tos
3 - should recieve first and second in order
4
5 DefaultRailsBehaviourSpec::TheController GET :two_responses
6 - should only receive first and NOT second
7
8 action_responses
9 - SuperController.action_responses should not == SubController.action_responses
10 - SuperController should have one action_response for 'a_response'
11 - SubController should have two action_responses for 'a_response', and one each for 'an_action', and 'performing_action'
12
13 InheritedControllerSpec::SuperController GET :an_action
14 - should execute action
15 - should render :an_action
16
17 InheritedControllerSpec::SuperController GET :a_response
18 - should execute inside the super response block
19 - should NOT execute inside the sub response block
20
21 InheritedControllerSpec::SuperController GET :performing_action
22 - should redirect
23
24 InheritedControllerSpec::SubController GET :an_action (decorated with redirecting response_for)
25 - should execute action
26 - should redirect
27
28 InheritedControllerSpec::SubController GET :a_response (decorated with a new response)
29 - should NOT execute the super response
30 - should execute the sub response
31
32 InheritedControllerSpec::SubController GET :performing_action
33 - should NOT execute the sub response
34 - should redirect as per the super def
35
36 NoResponseIfPerformedSpec::TheController when before_filter redirects, GET :an_action
37 - should redirect to 'http://redirected.from.before_filter'
38 - should not execute inside response_for
39
40 NoResponseIfPerformedSpec::TheController when before_filter doesn't redirect, GET :an_action
41 - should execute inside response for
42 - should render :an_action
43
44 Picking template PickTemplateSpec::TemplateOnlyController GET :an_action, HTTP_ACCEPT =
45 - text/html, should render an_action.html
46 - application/xml, should IGNORE and render an_action.html
47
48 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::RespondToTypesController
49 - GET :an_action, should render an_action.atom
50
51 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::RespondToTypesController GET :an_action, HTTP_ACCEPT =
52 - text/html, should render an_action.html
53 - application/xml, should render an_action.xml
54 - text/javascript, should render an_action.js
55 - application/atom+xml, should render an_action.atom
56
57 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::RespondToTypesController GET :an_action, :format =>
58 - :html, should render an_action.html
59 - :js, should render an_action.js
60 - :xml, should render an_action.xml
61 - :atom, should render an_action.atom
62
63 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::RespondToBlockController
64 - GET :an_action, should render an_action.atom
65
66 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::RespondToBlockController GET :an_action, HTTP_ACCEPT =
67 - text/html, should render an_action.html
68 - application/xml, should render an_action.xml
69 - text/javascript, should render an_action.js
70 - application/atom+xml, should render an_action.atom
71
72 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::RespondToBlockController GET :an_action, :format =>
73 - :html, should render an_action.html
74 - :js, should render an_action.js
75 - :xml, should render an_action.xml
76 - :atom, should render an_action.atom
77
78 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForTypesController
79 - GET :an_action, should render an_action.atom
80
81 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForTypesController GET :an_action, HTTP_ACCEPT =
82 - text/html, should render an_action.html
83 - application/xml, should render an_action.xml
84 - text/javascript, should render an_action.js
85 - application/atom+xml, should render an_action.atom
86
87 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForTypesController GET :an_action, :format =>
88 - :html, should render an_action.html
89 - :js, should render an_action.js
90 - :xml, should render an_action.xml
91 - :atom, should render an_action.atom
92
93 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForBlockController
94 - GET :an_action, should render an_action.atom
95
96 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForBlockController GET :an_action, HTTP_ACCEPT =
97 - text/html, should render an_action.html
98 - application/xml, should render an_action.xml
99 - text/javascript, should render an_action.js
100 - application/atom+xml, should render an_action.atom
101
102 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForBlockController GET :an_action, :format =>
103 - :html, should render an_action.html
104 - :js, should render an_action.js
105 - :xml, should render an_action.xml
106 - :atom, should render an_action.atom
107
108 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForMixOfBlockAndTypesController
109 - GET :an_action, should render an_action.atom
110
111 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForMixOfBlockAndTypesController GET :an_action, HTTP_ACCEPT =
112 - text/html, should render an_action.html
113 - application/xml, should render an_action.xml
114 - text/javascript, should render an_action.js
115 - application/atom+xml, should render an_action.atom
116
117 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::ResponseForMixOfBlockAndTypesController GET :an_action, :format =>
118 - :html, should render an_action.html
119 - :js, should render an_action.js
120 - :xml, should render an_action.xml
121 - :atom, should render an_action.atom
122
123 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::InheritedController
124 - GET :an_action, should render an_action.atom
125
126 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::InheritedController GET :an_action, HTTP_ACCEPT =
127 - text/html, should render an_action.html
128 - application/xml, should render an_action.xml
129 - text/javascript, should render an_action.js
130 - application/atom+xml, should render an_action.atom
131
132 Picking template [:atom, :xml, :html, :js] PickTemplateSpec::InheritedController GET :an_action, :format =>
133 - :html, should render an_action.html
134 - :js, should render an_action.js
135 - :xml, should render an_action.xml
136 - :atom, should render an_action.atom
137
138 RemoveResponseForSpec::TheController
139 - should have action_responses for :foo and :bar
140
141 RemoveResponseForSpec::TheController.remove_response_for :bar
142 - should hanve action_responses for :foo
143
144 RemoveResponseForSpec::TheController.remove_response_for
145 - should have empty action_responses
146
0cb80d7a » ianwhite 2008-10-10 0.2.1 tag released 147 ResponsesModuleSpec::MyController
148 - should have action_response for :foo
149 - should have action :foo
150 - should have method defined by included
151
8ac908ad » ianwhite 2008-09-14 Added specs for stacking re... 152 StackingResponsesSpec::TheController with responses conditionally executed GET :foo (no conditions)
153 - should execute second, then first, response
154 - should NOT execute the html response in first
155 - should NOT execute the html response in second
156 - should render :action => :foo (the default response)
157
158 StackingResponsesSpec::TheController with responses conditionally executed GET :foo, :second => true
6a8d4ccf » ianwhite 2008-09-17 Updated README with more no... 159 - should execute second, then first, then html second, response
8ac908ad » ianwhite 2008-09-14 Added specs for stacking re... 160 - should redirect from second response
161 - should NOT execute first html response
162
163 StackingResponsesSpec::TheController with responses conditionally executed GET :foo, :first => true
6a8d4ccf » ianwhite 2008-09-17 Updated README with more no... 164 - should execute second, then first, then first html response
8ac908ad » ianwhite 2008-09-14 Added specs for stacking re... 165 - should redirect from first response
166 - should NOT execute second html response
167
168 StackingResponsesSpec::TheController with responses conditionally executed GET :foo, :first => true, :second => true (can't execute two html blocks)
6a8d4ccf » ianwhite 2008-09-17 Updated README with more no... 169 - should execute second, then first, then second html response
8ac908ad » ianwhite 2008-09-14 Added specs for stacking re... 170 - should redirect from second response
171 - should NOT execute first html response
172
0cb80d7a » ianwhite 2008-10-10 0.2.1 tag released 173 Ardes::ResponseFor::VERSION
174 - STRING should be 0.2.1
175
176 Finished in 0.851266 seconds
8ac908ad » ianwhite 2008-09-14 Added specs for stacking re... 177
0cb80d7a » ianwhite 2008-10-10 0.2.1 tag released 178 96 examples, 0 failures