One claimed feature of webrat is
"Webrat::Matchers API for verifying rendered HTML using CSS, XPath,
etc. "
However the example does not give a clue as how to do this. cheat
webrat gives a minor clue (but it does not work)
I use webrat with rails. 'cheat webrat' gives the following example:
response.should have_selector('div.pagination')
but if I use that I get an error like this:
NoMethodError: undefined method `should' for #<ActionController::Response:0x7fcfd9204c88>
I believe I have configured webrat correct because the methods in the
webrat example works fine.
Please update the example to expose how to take advantage of
"Webrat::Matchers API for verifying rendered HTML using CSS, XPath,
etc. "
Thanks, Jarl
> Dear Bryan.
>
> One claimed feature of webrat is
> "Webrat::Matchers API for verifying rendered HTML using CSS, XPath,
> etc. "
>
> However the example does not give a clue as how to do this. cheat
> webrat gives a minor clue (but it does not work)
>
> I use webrat with rails. 'cheat webrat' gives the following example:
>
> response.should have_selector('div.pagination')
>
> but if I use that I get an error like this:
> NoMethodError: undefined method `should' for #<ActionController::Response:0x7fcfd9204c88>
#should isn't a webrat method, it's an RSpec method. You need to make sure RSpec is installed and the right rspec files are required (depending on what version you want to use). Ask on the rspec list for details.
>
> I believe I have configured webrat correct because the methods in the
> webrat example works fine.
>
> Please update the example to expose how to take advantage of
> "Webrat::Matchers API for verifying rendered HTML using CSS, XPath,
> etc. "
>
> Thanks, Jarl
>
> --
> You received this message because you are subscribed to the Google Groups "webrat" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to webrat+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/webrat?hl=en.
>
cheers,
Matt
> #should isn't a webrat method, it's an RSpec method. You need to make sure RSpec is installed and the right rspec files are required (depending on what version you want to use). Ask on the rspec list for details.
>
Thanks, that makes sense. But the README could mention that this
feature is for RSpec users... and the 'cheat webrat' page does not
mention RSpec either...
I am not using RSpec (yet). But this is yet another reason to consider
RSpec...
Jarl
> Matt Wynne <ma...@mattwynne.net> writes:
>
>> #should isn't a webrat method, it's an RSpec method. You need to make sure RSpec is installed and the right rspec files are required (depending on what version you want to use). Ask on the rspec list for details.
>>
>
> Thanks, that makes sense. But the README could mention that this
> feature is for RSpec users... and the 'cheat webrat' page does not
> mention RSpec either...
I'm sure Byran will happily accept a patch to the README that makes it easier to understand :)
>
> I am not using RSpec (yet). But this is yet another reason to consider
> RSpec...
>
> Jarl
>