Forum: RSpec Where to put Cucumber Utilities?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
aidy lewis (Guest)
on 2008-12-15 13:33
(Received via mailing list)
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?

Aidy
Aslak H. (Guest)
on 2008-12-15 13:39
(Received via mailing list)
On Mon, Dec 15, 2008 at 12:30 PM, aidy lewis
<removed_email_address@domain.invalid>wrote:

>
>
> 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
This topic is locked and can not be replied to.