Repeated test descriptions with RSpec for every user role
Creating some controller tests with RSpec, I find myself repeating several test cases for every possible user role. For example describe "GET 'index'" do context "for admin user" do login_user("admin") it "has the right title" do response.should have_selector("title", :content => "the title") end end context "for regular user" do login_user("user") it "has the right title" do response.should have_selector("title", :content => "the title") end end end This is a simple example just to make my point, but I have a lot of tests that are repeated... Of course there are also some tests that are