Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of garlic/work/edge/vendor/plugins/response_for
- Loading branch information
Showing
4 changed files
with
33 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
|
||
BackToFooController: | ||
BackToFooController | ||
- get :foo, :format => 'xml' should not render foo | ||
|
||
DefaultRespondToController behaviour of #respond_to: | ||
- get :foo should not call first | ||
- get :foo should not call second | ||
- get :foo should call third | ||
|
||
FooBailOutController: | ||
FooBailOutController | ||
- get :foo, :bail_out => true should redirect | ||
|
||
FooController: | ||
FooController | ||
- get :foo should render text/html: foo | ||
- get :foo should assign @foo | ||
- get :foo, :format => 'html' should render foo | ||
- get :foo, :format => 'xml' should not render foo | ||
|
||
InlineXmlFooController: | ||
- get :foo should render text/html 'foo' | ||
FooAController | ||
- get :foo should call a | ||
- get :baz should call bazza (inside the response_for block) | ||
|
||
FooBController | ||
- get :foo should call b | ||
|
||
InlineXmlFooController | ||
- get :foo should assign @foo | ||
- get :foo, :format => 'html' should render 'foo' | ||
- get :foo, :format => 'xml' should call xml_call with 'foo | ||
- get :foo, :format => 'xml' should have response.body of 'XML' | ||
|
||
XmlFooController: | ||
XmlFooController | ||
- get :foo should render foo | ||
- get :foo should assign @foo | ||
- get :foo, :format => 'html' should render foo | ||
- get :foo, :format => 'xml' should render foo | ||
- get :bar, :format => 'xml' should render bar | ||
- get :just_a_template, :format => 'xml' should render just_a_template | ||
|
||
XmlOnlyFooController: | ||
XmlOnlyFooController | ||
- get :foo should render xml: foo | ||
- get :bar should render xml: bar | ||
- get :foo should assign @foo | ||
- get :foo, :format => 'html' should not render foo | ||
- get :foo, :format => 'xml' should render foo | ||
|
||
class method #action_responses: | ||
class method #action_responses | ||
- @child.action_responses[:action] should be copy of parent's action response for :action | ||
- @grandchild.action_responses[:action] should be copy of @child.action_responses[:action] | ||
- @child.action_responses[:action] not be same object as parent's action response for :action | ||
- @grandchild.action_responses[:action] not be same object as @child.action_responses[:action] | ||
- adding to @grandchild.action_responses[:action] should not change parents | ||
|
||
Finished in 0.236473 seconds | ||
Finished in 0.328216 seconds | ||
|
||
30 examples, 0 failures | ||
28 examples, 0 failures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters