Test coverage around impressions for non-restful controller actions. Added dummy route, index method, view and dummy controller spec.
This commit is contained in:
parent
39c217a976
commit
495e0a4273
|
@ -3,4 +3,6 @@ class DummyController < ActionController::Base
|
||||||
|
|
||||||
impressionist
|
impressionist
|
||||||
|
|
||||||
|
def index
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
TestApp::Application.routes.draw do
|
TestApp::Application.routes.draw do
|
||||||
resources :articles, :posts, :widgets
|
resources :articles, :posts, :widgets, :dummy
|
||||||
end
|
end
|
||||||
|
|
|
@ -123,3 +123,12 @@ describe WidgetsController do
|
||||||
end
|
end
|
||||||
|
|
||||||
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
|
Loading…
Reference in New Issue