require File.dirname(__FILE__) + '/../spec_helper' module HomeControllerSpecHelper end context "Home page" do controller_name :home setup do 10.times { SpecFixtures.sample_plugin } get :index end specify "should respond successfully" do response.should_be_success end specify "should display the ten newest plugins" do assigns(:plugins).size.should_be 10 assigns(:plugins).each { |p| p.should_be_an_instance_of Plugin } end end