Is it possible to reuse code "steps" in Steak?

7 views
Skip to first unread message

DK

unread,
Dec 3, 2010, 10:55:02 AM12/3/10
to Steak
For the first time I looked at and was reading up on Steak last night.
I am curious if it is possible to reuse code --- akin to how in
Cucumber I can create a step and use it many times. Although I see the
point in Steak of not having separate Features/Steps and agree that it
would make my life easier, it seems also important that I do not have
to repeat or copy/paste... are there ways to do this in Steak ---
could it be as easy as just creating methods or even modules to mix in
to the Steak test classes?

Thanks,

David

Luismi Cavallé

unread,
Dec 3, 2010, 12:23:49 PM12/3/10
to ste...@googlegroups.com
On Dec 3, 2010, at 4:55 PM, DK wrote:

> could it be as easy as just creating methods or even modules to mix in
> to the Steak test classes?

Exactly, `spec/acceptance/support/helpers.rb` is the place to put your helper methods

-- Luismi

>
> Thanks,
>
> David

David Kahn

unread,
Dec 10, 2010, 6:09:38 PM12/10/10
to ste...@googlegroups.com
On Fri, Dec 3, 2010 at 11:23 AM, Luismi Cavallé <lmca...@gmail.com> wrote:
On Dec 3, 2010, at 4:55 PM, DK wrote:

> could it be as easy as just creating methods or even modules to mix in
> to the Steak test classes?

Exactly, `spec/acceptance/support/helpers.rb` is the place to put your helper methods

Thanks Luismi... well you've got it, I am frustrated enough and although I thought I would continue with Cucumber on this project I am ready to pitch it to try Steak. I will post results as I am pretty passionate about the question of simplicity and the original Rails concept of convention over configuration. I feel with Cukes and Rspec I spend a lot of time and mental resources on (a) configuration and (b) dealing with new DSL's which IMO don't afford me too much.... Anyhow keep up the work, I like how you think.

David


 

-- Luismi

>
> Thanks,
>
> David


Reply all
Reply to author
Forward
0 new messages