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?
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