On Mon, Apr 6, 2009 at 11:59 PM, Phlip <phlip2...@gmail.com> wrote: > David Chelimsky wrote: > >> Try this: >> >> describe "/default/index.html.erb", :type => :view do >> include DefaultHelper >> >> it "should render" do >> template.view_paths=(File.join(File.dirname(__FILE__), >> "/../../../themes/my_theme/")) >> render >> end > > And why isn't that DRY with the matching /../../../themes code on the > production side?
Because nobody has asked for support for views outside the standard directories, and *you* haven't submitted a patch! http://rspec.lighthouseapp.com Cheers, David > > BTW, as a meta-answer, I implemented this algorithm for a test once... > > for each theme in themes/* > render the theme > assert the theme passes Tidy validation > assert all the a hrefs point somewhere > assert every image appears in public/images > > Hours of fun! If you have two many themes, you can pick a random assortment > for each integration test run... > > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users