Permalink
Browse files

test for when no assets are found to match

  • Loading branch information...
1 parent 4e2e2aa commit 6be3fefbe65929c5d4baac89965b84b51474c8b1 @justinfrench committed Sep 16, 2009
Showing with 9 additions and 2 deletions.
  1. +5 −2 test/publicious_controller_test.rb
  2. +4 −0 test/test_helper.rb
@@ -3,7 +3,10 @@
class PubliciousControllerTest < ActionController::TestCase
tests PubliciousController
- test "the truth" do
- assert_equal true, true
+ test "when no assets are found" do
+ assert_raises ActionView::MissingTemplate do
+ get :show, :path => 'does/not/exist.js'
+ end
end
+
end
View
@@ -9,3 +9,7 @@ class ApplicationController < ActionController::Base
end
require File.dirname(__FILE__) + '/../app/controllers/publicious_controller'
+
+ActionController::Routing::Routes.draw do |map|
+ map.connect ':controller/:action/:id'
+end

0 comments on commit 6be3fef

Please sign in to comment.