require 'spec_helper' describe "users/index.html.erb" do before(:each) do assign(:users, [ stub_model(User, :name => "Name", :nickname => "Nickname", :image => "Image", :description => "Description", :location => "Location" ), stub_model(User, :name => "Name", :nickname => "Nickname", :image => "Image", :description => "Description", :location => "Location" ) ]) end it "renders a list of users" do render # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers assert_select "tr>td", :text => "Name".to_s, :count => 2 # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers assert_select "tr>td", :text => "Nickname".to_s, :count => 2 # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers assert_select "tr>td", :text => "Image".to_s, :count => 2 # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers assert_select "tr>td", :text => "Description".to_s, :count => 2 # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers assert_select "tr>td", :text => "Location".to_s, :count => 2 end end