 <pre><code> describe ArticlesController do let(:user) do user = FactoryGirl.create(:user) user.confirm! user end describe "GET #index" do it "populates an array of articles of the user" do #how can i create an article of the user here sign_in user get :index assigns(:articles).should eq([article]) end it "renders the :index view" do get :index response.should render_template :index end it "assign all atricles to @atricles" do get :index assigns(:atricles).your_awesome_test_check # assigns(:articles) would give you access to instance variable end end end </code></pre>