[rspec-users] Where to put Cucumber Utilities?
aidy lewis
aidy.lewis at googlemail.com
Mon Dec 15 06:30:27 EST 2008
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
More information about the rspec-users
mailing list