require File.expand_path(File.dirname(__FILE__) + '/../../../spec_helper') describe 'rails view helper' do load_helper :view before :each do create_view :account, :edit do %q{

<%= title %>

} end end after :each do remove_view :account, :edit end it "should have an account/edit view file that displays a title" do Rails.application.should have_view :account, :edit do |file| file.should match /<%=\s*title\s*%>/ end end end