require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe 'controller' do load_helper :controller before :each do create_empty_tmp :controller create_controller :account do %q{ def index end } end end after :each do remove_controller :account end it "should have an account_controller file that contains an AccountController class with an index method inside" do Rails.application.should have_controller :account do |controller_file| controller_file.should have_controller_class :account do |klass| klass.should have_method :index end end end end