ruby on rails - Sharing Rspec tests between classes -
hey all; in writing tests controller controller rspec, i've found myself duplicating few basic tests, such check index:
describe "on index" "renders index template" :index response.should render_template('index') end end
i feel test important, redundant, when added 5 different controllers. there way share tests between controller classes, or include specific code blocks method call in rspec? or best practices duplicate, in case?
yes you can, , think lead cleaner code.
Comments
Post a Comment