Error messages at the bottom or at the top of the page, not handy with very long code

6 views
Skip to first unread message

philipp...@yahoo.fr

unread,
Jan 8, 2018, 2:18:08 AM1/8/18
to rspec
Hi everyone,

(Xavier Shay suggested me to post my question here)

Is there a way to avoid the annoying thing below in rspec feedback when the page code is very long?

One time (bad content error) :

Failure/Error: expect(page)...

     

       "Mauvais titre" expected within "h2[id='main_titre']" in following template:

       <html><head>
[...
          a
    very
  very
  very
  long page code (two list, three iframes, etc.)
        ...]
       </body></html>


(the error message is on the top)

Another time (tag missing error):

 Failure/Error: expect(page).send(meth, have_tag(tag, attrs))

     

       expected following:
       <html><head>
[...
          a
    very
  very
  very
  long page code (two list, three iframes, etc.)
        ...]
       </body></html>
       to have at least 1 element matching "h2[id='main_titre']", found 0.
     # ./spec/......'



(the error message is on the bottom)

Couldn't it be nice if error message stands both at the top and at the bottom (or only at the top or at the bottom)?

By the way, thanks to you and the rspec's team for this wonderful tool!

Cheers,

Philippe (from France)

Myron Marston

unread,
Jan 9, 2018, 1:53:11 AM1/9/18
to rs...@googlegroups.com
It's not quite clear to me what change you are asking for.  Could you provide an example of the output you'd like to see?

Regardless, a custom formatter is probably going to be the best way to get the output you want.  You can customize the output in whatever manner you like with a custom formatter.

HTH,
Myron

--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+unsubscribe@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/b767c645-a44a-4869-8c76-6c03c5011b49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages