Commit af179ec483809310723185eeaa8ed1173e76066b

Authored by Luke Baker
1 parent 0f9ca384

re-indent questions_controller_spec

Showing 1 changed file with 25 additions and 26 deletions   Show diff stats
spec/controllers/questions_controller_spec.rb
1 1 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2 2  
3 3 describe QuestionsController do
4   -
5   - def sign_in_as(user)
6   - @controller.current_user = user
7   - return user
8   - end
9 4  
10   - before(:each) do
11   - @question = Factory.create(:aoi_question)
12   - sign_in_as(@user = @question.site)
13   - end
14   - it "responds with basic question information" do
15   - get :show, :id => @question.id, :format => "xml"
  5 + def sign_in_as(user)
  6 + @controller.current_user = user
  7 + return user
  8 + end
16 9  
17   - assigns[:question].should == @question
18   - @response.body.should have_tag("question")
19   - @response.code.should == "200"
20   - end
  10 + before(:each) do
  11 + @question = Factory.create(:aoi_question)
  12 + sign_in_as(@user = @question.site)
  13 + end
21 14  
  15 + it "responds with basic question information" do
  16 + get :show, :id => @question.id, :format => "xml"
  17 + assigns[:question].should == @question
  18 + @response.body.should have_tag("question")
  19 + @response.code.should == "200"
  20 + end
22 21  
23   - it "responds with question with prompt and appearance and visitor information" do
24   - get :show, :id => @question.id, :format => "xml", :with_appearance => true, :with_prompt => true, :with_visitor_stats => true, :visitor_identifier => "jim"
25 22  
26   - assigns[:question].should == @question
27   - #@response.body.should be_nil
28   - @response.code.should == "200"
29   - @response.body.should have_tag("question")
30   - @response.body.should have_tag("picked_prompt_id")
31   - @response.body.should have_tag("appearance_id")
32   - @response.body.should have_tag("visitor_votes")
33   - @response.body.should have_tag("visitor_ideas")
  23 + it "responds with question with prompt and appearance and visitor information" do
  24 + get :show, :id => @question.id, :format => "xml", :with_appearance => true, :with_prompt => true, :with_visitor_stats => true, :visitor_identifier => "jim"
34 25  
35   - end
  26 + assigns[:question].should == @question
  27 + #@response.body.should be_nil
  28 + @response.code.should == "200"
  29 + @response.body.should have_tag("question")
  30 + @response.body.should have_tag("picked_prompt_id")
  31 + @response.body.should have_tag("appearance_id")
  32 + @response.body.should have_tag("visitor_votes")
  33 + @response.body.should have_tag("visitor_ideas")
  34 + end
36 35 end
... ...