Test coverage around impressions for non-restful controller actions. Added dummy route, index method, view and dummy controller spec.

This commit is contained in:
Ty Rauber 2013-03-30 13:30:56 -07:00
parent 39c217a976
commit 495e0a4273
4 changed files with 12 additions and 1 deletions

View File

@ -3,4 +3,6 @@ class DummyController < ActionController::Base
impressionist
def index
end
end

View File

View File

@ -1,3 +1,3 @@
TestApp::Application.routes.draw do
resources :articles, :posts, :widgets
resources :articles, :posts, :widgets, :dummy
end

View File

@ -123,3 +123,12 @@ describe WidgetsController do
end
end
describe DummyController do
fixtures :impressions
render_views
it "should log impression at the per action level on non-restful controller" do
get "index"
Impression.all.size.should eq 12
end
end