require 'rails_helper' RSpec.describe "settings/zones/index", type: :view do before(:each) do assign(:settings_zones, [ Settings::Zone.create!( :name => "Name", :is_active => false, :created_by => "Created By" ), Settings::Zone.create!( :name => "Name", :is_active => false, :created_by => "Created By" ) ]) end it "renders a list of settings/zones" do render assert_select "tr>td", :text => "Name".to_s, :count => 2 assert_select "tr>td", :text => false.to_s, :count => 2 assert_select "tr>td", :text => "Created By".to_s, :count => 2 end end