[rspec-users] spec'ing theme views
dchelimsky at gmail.com
Tue Apr 7 01:12:40 EDT 2009
On Mon, Apr 6, 2009 at 11:59 PM, Phlip <phlip2005 at gmail.com> wrote:
> David Chelimsky wrote:
>> Try this:
>> describe "/default/index.html.erb", :type => :view do
>> include DefaultHelper
>> it "should render" do
> 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!
> 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 at rubyforge.org
More information about the rspec-users