-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hissao
committed
Jul 26, 2012
1 parent
5294171
commit 6666017
Showing
9 changed files
with
78 additions
and
78 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
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
class FeedController < ApplicationController | |||
def index | |||
|
|||
@materias = Domain::Materia.all | |||
|
|||
end | |||
end |
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,3 +1,3 @@ | |||
class Feed | class Feed | ||
|
|||
end | end |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +0,0 @@ | |||
<p>Hello world</p> | |||
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,42 @@ | |||
require 'spec_helper' | |||
|
|||
describe HomeController do | |||
render_views | |||
|
|||
context "on GET to /feed" do | |||
before do | |||
request.accept = "application/json" | |||
@get_args = [:index] | |||
get *@get_args | |||
end | |||
it "should render JSON" do | |||
response.content_type.should be == "application/json" | |||
end | |||
it_should_behave_like "a cached response" | |||
end | |||
|
|||
#context "on GET to /concursos/novo_concurso" do | |||
# before do | |||
# request.accept = "application/json" | |||
# @get_args = [:new] | |||
# get *@get_args | |||
# end | |||
# it "should render JSON" do | |||
# response.content_type.should be == "application/json" | |||
# json = JSON.parse response.body | |||
# json.keys.sort.should be == %w[concurso link] | |||
# json["concurso"].should be_kind_of Hash | |||
# json["link"].should be_kind_of Array | |||
# | |||
# json["concurso"]["categorias"].should be_kind_of Array | |||
# json["concurso"]["rotulos_controlados"].should be_kind_of Array | |||
# json["concurso"]["conteudos_relacionados"].should be_kind_of Array | |||
# json["concurso"]["editorias"].should be_kind_of Array | |||
# json["concurso"]["tags"].should be_kind_of Array | |||
# | |||
# json["link"].map{ |l| l["rel"] }.uniq.sort.should be == %w[concursos self] | |||
# end | |||
# it_should_behave_like "a cached response" | |||
#end | |||
|
|||
end |