[Celerity-users] asserting browser location

Ashley Moran ashley.moran at patchspace.co.uk
Sat Feb 14 16:16:33 EST 2009


On 14 Feb 2009, at 20:36, Joaquin Rivera Padron wrote:

> have started using celerity (and culerity) with cucumber and looks  
> pretty good,

Hi Joaquin

Welcome to the club of Cucumber+Celerity users =)  I am a huge fan of  
both, although I don't use nearly as many of the features of Celerity  
as I'm sure I could


> I have searched through docs and examples but did not seem to find  
> this here: how could I do something like?
>
> browser.location.should == some_path

I do this with

   @browser.url.should =~ %r|/items/new|

or whatever...


> and how about being able to do this:
>
> Then I should not navigate away
>
> and the step maybe like this:
>
> browser.last_location == browser.location
>
> to spec browser does not navigate away from current page. what do  
> you think? does that make sense?

There's a Browser#back method, but I've never used it.  Does that help?


> forgive the newbiness

If you're never a newbie you're never learning something new!

You may find a crude example of Celerity and Cumumber I wrote ages  
ago[1] of some use.  Let me know if you find it helpful, as I'm  
planning to do a repeat of this talk.  (Much as I'd like, I don't get  
time to prepare much new BDD material...)


Ashley


[1] http://aviewfromafar.net/2008/10/2/geekup-sheffield-vi-from-specification-to-success


-- 
http://www.patchspace.co.uk/
http://aviewfromafar.net/
http://twitter.com/ashleymoran





More information about the Celerity-users mailing list