On Apr 8, 3:21 pm, Ashley Moran <[email protected]> wrote:
> My first recommendation is: don't mock in Cucumber features!  (Unless  
> they are deliberately lower-level features.)  You want something that  
> runs the *real* app under *real* conditions, or you can't say for sure  
> that your features prove your app works (which is a roundabout way of  
> saying, they don't).
>
> What I would do is have a standard set of domains and put them in /etc/
> hosts.  You could have, say,
>
> 127.0.0.1 nonexistant.myapp
> 127.0.0.1 wibbly.myapp
>
> Even better, put them in a rake task, like `rake  
> configure_testing_hosts` or some such, that adds these lines in if  
> they are missing.

I can do  this, but what's the quick way of telling it to use this as
a domain name? I had started to hack the app so that it would detect
if RAILS_ENV was test but that was not right. Still going to have to
construct the wibble object and all its supporting guff anyway but
that's not a big deal.

> Then your feature runs can just use these two localhost aliases.  It's  
> not brilliant to couple these to the test environment, BUT it's better  
> than faking it in the app.
>
> Second recommendation: don't try to separate authentication/
> authorisation and you app apart.  If you have to log in to access  
> something, that's part of the scenario.  You need a "Given 'I am  
> logged in...'" step in your Background to achieve this.
>

Meh - didn't know about Background - noob. Knew there must be
something like it.

> Anyway the above is just what I do.  HTH.
>
> Ashley

Ta

>
> BTW are you coming to the user-stories/Cucumber night on the 16th? =)

It takes 2 hours to get to central Manchester from where I work, which
means I'd be arriving about 19:45 unless I leave at 16:00 and next
week I will be working with the hammer down. I really want to come but
doubt it's practical. Plus, the last time I parked in Manchester, in
the rain, I didn't notice a tiny sign at the top of a 2.5 metre pole
saying it was a disabled space and it cost me £130 to get my car back,
so I tend to stay away from the place!

F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NWRUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to