Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added spec for when an error occurs in a template (currently failing) […
…#1]
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
1 change: 1 addition & 0 deletions
1
spec/fixtures/views/error_in_template_spec/a/error_in_template.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<% raise "Boom!" %> |