diff --git a/test_app/app/controllers/dummy_controller.rb b/test_app/app/controllers/dummy_controller.rb index 86664a6..c90cd9c 100644 --- a/test_app/app/controllers/dummy_controller.rb +++ b/test_app/app/controllers/dummy_controller.rb @@ -3,4 +3,6 @@ class DummyController < ActionController::Base impressionist + def index + end end diff --git a/test_app/app/views/dummy/index.html.erb b/test_app/app/views/dummy/index.html.erb new file mode 100644 index 0000000..e69de29 diff --git a/test_app/config/routes.rb b/test_app/config/routes.rb index 7bcb78e..76cb5b5 100644 --- a/test_app/config/routes.rb +++ b/test_app/config/routes.rb @@ -1,3 +1,3 @@ TestApp::Application.routes.draw do - resources :articles, :posts, :widgets + resources :articles, :posts, :widgets, :dummy end diff --git a/test_app/spec/controllers/controller_spec.rb b/test_app/spec/controllers/controller_spec.rb index a48b3a0..7f1307a 100644 --- a/test_app/spec/controllers/controller_spec.rb +++ b/test_app/spec/controllers/controller_spec.rb @@ -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 \ No newline at end of file