require 'spec_helper' describe "selections/index" do before(:each) do assign(:selections, [ stub_model(Selection, :name => "Name", :parent_id => 1, :system_code => "System Code", :position => 1, :is_default => false, :is_system => false ), stub_model(Selection, :name => "Name", :parent_id => 1, :system_code => "System Code", :position => 1, :is_default => false, :is_system => false ) ]) end it "renders a list of selections" do render # Run the generator again with the --webrat 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 flag if you want to use webrat matchers assert_select "tr>td", :text => 1.to_s, :count => 2 # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "tr>td", :text => "System Code".to_s, :count => 2 # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "tr>td", :text => 1.to_s, :count => 2 # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "tr>td", :text => false.to_s, :count => 2 # Run the generator again with the --webrat flag if you want to use webrat matchers assert_select "tr>td", :text => false.to_s, :count => 2 end end