Topic: Drying shoulda functional tests
I am trying to solve my very repetitive functional tests code - I use shoulda and its great macros, however I would like to catch the alway used parts of testing code into one place, without having neccessay to explicitely call it - the best way for me isnt another shoulda macro (like the deprecated should_be_restful, which is exactly what I mean - I want to test the basic CRUD operations on many similar controllers), I would like to use some abstract test case. Doesn't someone have a nice example? What I did is almost what I need, but for an unknown reason the tests are runned twice
Thanks for any kind of advice.
class AbstractControllerTest < ActionController::TestCase
logged_in_as :admin do
context "index" do
class Admin::LabelsControllerTest < AbstractControllerTest