[rspec-users] Using Haml for view tests

71 views
Skip to first unread message

Joe Fiorini

unread,
Mar 24, 2008, 12:38:26 PM3/24/08
to rspec-users
I'm writing a view test and I render index.html.haml. However,
autotest does not pick up changes to this file, but more importantly,
when the tests do run I get my Haml source displayed in the "actual"
result, instead of rendered Html. Does rspec support Haml in this
way? Is there another way to test Haml views?

Thanks all!
Joe
_______________________________________________
rspec-users mailing list
rspec...@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

David Chelimsky

unread,
Apr 7, 2008, 10:40:41 AM4/7/08
to rspec-users
On Mon, Mar 24, 2008 at 12:38 PM, Joe Fiorini <j...@faithfulgeek.org> wrote:
> I'm writing a view test and I render index.html.haml. However,
> autotest does not pick up changes to this file, but more importantly,
> when the tests do run I get my Haml source displayed in the "actual"
> result, instead of rendered Html. Does rspec support Haml in this
> way? Is there another way to test Haml views?

RSpec sets up mappings only for rhtml and html.erb views. You can add
your own mappings to deal w/ haml if you like. Check this out:
http://tinyurl.com/25xdey

Cheers,
David

Reply all
Reply to author
Forward
0 new messages