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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -