Skip to content

Commit

Permalink
Added spec for when an error occurs in a template (currently failing) [
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Feb 19, 2009
1 parent bcc544a commit 7c899c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/controllers/error_in_template_spec.rb
@@ -0,0 +1,19 @@
require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))

module ErrorInTemplateSpec
class AController < ActionController::Base
self.view_paths = [File.join(File.dirname(__FILE__), '../fixtures/views')]

response_for :action_rendering_erroneous_template do |format|
format.html { render :action => 'error_in_template' }
end
end

describe AController do
integrate_views

it "GET :action_rendering_erroneous_template should raise \"Boom!\"" do
lambda { get :action_rendering_erroneous_template }.should raise_error("Boom!")
end
end
end
@@ -0,0 +1 @@
<% raise "Boom!" %>

0 comments on commit 7c899c0

Please sign in to comment.