[rspec-users] Where to put Cucumber Utilities?

aslak hellesoy aslak.hellesoy at gmail.com
Mon Dec 15 06:36:04 EST 2008


On Mon, Dec 15, 2008 at 12:30 PM, aidy lewis <aidy.lewis at googlemail.com>wrote:

> Hi,
>
> I use Watir\Firewatir with Cucumber. I previously used a framework
> that object modelled the A-U-T; so each HTML page would be a class and
> each object a method: this improved readability.
>
> We came to the conclusion that this was over-engineering, slow and
> boring; so I annihilated the object model.
>
> However, there are utilities I still need for all sites e.g.
>
>  class DownloadedInternetFiles
>    def delete
>      require 'fileutils'
>      cache =  "C:\\Documents and Settings\\#{ENV['USERNAME']}\\Local
> Settings\\Temporary Internet Files"
>      cookies = "C:\\Documents and Settings\\#{ENV['USERNAME']}\\Cookies"
>      FileUtils.rm_rf  cache
>      FileUtils.rm_rf  cookies
>    end
>  end
>
> Not sure where to put things like this. There are Helpers, but this
> seems a little procedural to me.
>
> Any thoughts?
>

You can put them in any directory that holds Ruby files that Cucumber loads.
For example features/support

Aslak


>
> Aidy
> _______________________________________________
> 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/20081215/38bff924/attachment.html>


More information about the rspec-users mailing list