Hello All,
I''m trying to view-spec with haml
require ''spec_helper''
describe "user_sessions/new.html.erb" do
it "renders blank form" do
activate_authlogic
user_session = UserSession.new
assign :user_session, user_session
debugger
render
render.should have_tag(''text.email'')
end
end
The response is this Failure :
1) user_sessions/new.html.haml renders blank form
Failure/Error: render
No route matches {}
I have verified that ''new.html.erb'' renders and matches OK.
Is there a way in rspec 2 to enable Haml rendering ?
--
Peter Fitzgibbons
(847) 859-9550
peter.fitzgibbons at gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/rspec-users/attachments/20100610/cfbe840d/attachment.html>
On Thu, Jun 10, 2010 at 2:53 PM, Peter Fitzgibbons <peter.fitzgibbons at gmail.com> wrote:> Hello All, > > I''m trying to view-spec with haml > require ''spec_helper'' > > describe "user_sessions/new.html.erb" do > ? it "renders blank form" do > ??? activate_authlogic > ??? user_session = UserSession.new > ??? assign :user_session, user_session > ??? debugger > ??? render > ??? render.should have_tag(''text.email'') > ? end > end > > The response is this Failure : > 1) user_sessions/new.html.haml renders blank form > ??? Failure/Error: render > ??? No route matches {} > > I have verified that ''new.html.erb'' renders and matches OK. > > Is there a way in rspec 2 to enable Haml rendering ?new.html.erb or new.html.haml?
HI David,
I''m not sure what your question was ?
To word it differently : Does anyone know what the issue might be with a
view spec on ''new.html.haml'' :
1) user_sessions/new.html.haml renders blank form
Failure/Error: render
No route matches {}
Peter Fitzgibbons
(847) 859-9550
peter.fitzgibbons at gmail.com
IM GTalk: peter.fitzgibbons
IM AOL: peter.fitzgibbons at gmail.com
On 6/10/10 3:13 PM, David Chelimsky wrote:> On Thu, Jun 10, 2010 at 2:53 PM, Peter Fitzgibbons
> <peter.fitzgibbons at gmail.com> wrote:
>> Hello All,
>>
>> I''m trying to view-spec with haml
>> require ''spec_helper''
>>
>> describe "user_sessions/new.html.erb" do
>> it "renders blank form" do
>> activate_authlogic
>> user_session = UserSession.new
>> assign :user_session, user_session
>> debugger
>> render
>> render.should have_tag(''text.email'')
>> end
>> end
>>
>> The response is this Failure :
>> 1) user_sessions/new.html.haml renders blank form
>> Failure/Error: render
>> No route matches {}
>>
>> I have verified that ''new.html.erb'' renders and
matches OK.
>>
>> Is there a way in rspec 2 to enable Haml rendering ?
> new.html.erb or new.html.haml?
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/rspec-users/attachments/20100611/a4215e46/attachment.html>
HI David, If you could point me toward the interesting part of the rspec source I would be willing to look into this from the back end. Thanks, Peter Fitzgibbons (847) 859-9550 peter.fitzgibbons at gmail.com IM GTalk: peter.fitzgibbons IM AOL: peter.fitzgibbons at gmail.com On 6/10/10 3:13 PM, David Chelimsky wrote:> On Thu, Jun 10, 2010 at 2:53 PM, Peter Fitzgibbons > <peter.fitzgibbons at gmail.com> wrote: >> Hello All, >> >> I''m trying to view-spec with haml >> require ''spec_helper'' >> >> describe "user_sessions/new.html.erb" do >> it "renders blank form" do >> activate_authlogic >> user_session = UserSession.new >> assign :user_session, user_session >> debugger >> render >> render.should have_tag(''text.email'') >> end >> end >> >> The response is this Failure : >> 1) user_sessions/new.html.haml renders blank form >> Failure/Error: render >> No route matches {} >> >> I have verified that ''new.html.erb'' renders and matches OK. >> >> Is there a way in rspec 2 to enable Haml rendering ? > new.html.erb or new.html.haml? > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20100611/90127621/attachment-0001.html>
On Fri, Jun 11, 2010 at 10:29 AM, Peter Fitzgibbons <peter.fitzgibbons at gmail.com> wrote:> HI David, > > I''m not sure what your question was ?I think he was referring to the fact that you are asking about a haml view, but in your original post you have describe "user_sessions/new.html.erb" do rather than describe "user_sessions/new.html.haml" do -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale