Skip to content
Extraits de code Groupes Projets
dashboards_controller_spec.rb 588 octets
Newer Older
  • Learn to ignore specific revisions
  • require File.dirname(__FILE__) + '/../spec_helper'
     
    
    describe DashboardsController do
    
    maxwell's avatar
    maxwell a validé
     render_views
    
    maxwell's avatar
    maxwell a validé
        request.env['warden'] = mock_model(Warden, :authenticate? => @user, :authenticate! => @user)
    
        Factory.create(:user, :profile => Profile.create( :first_name => "bob", :last_name => "smith"))
    
      end
      
      it "index action should render index template" do
    
        get :index
        response.should render_template(:index)
      end
    
      it "on index sets a person's variable" do
        Factory.create :person
    
        assigns[:people].should == Person.friends.all