Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Zach Dennis
On Mon, Mar 17, 2008 at 9:59 AM, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > > On 17-mrt-2008, at 14:51, Zach Dennis wrote: > > > I have been putting helper methods inside of my own modules and then > > including them in RSpec::Story::World, which included in the context > > that stories are de

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Bart Zonneveld
On 17-mrt-2008, at 15:01, Ashley Moran wrote: > On 17/03/2008, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > Hmm, all of a sudden this thread is spiraling away from my original > question :). Which is good of course :). > I've made some inline comments. > > I can see how this would work for you, bu

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Ashley Moran
On 17/03/2008, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > > Hmm, all of a sudden this thread is spiraling away from my original > question :). Which is good of course :). > I've made some inline comments. > > I can see how this would work for you, but I actually want something > more abstracted. >

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Bart Zonneveld
On 17-mrt-2008, at 14:51, Zach Dennis wrote: > I have been putting helper methods inside of my own modules and then > including them in RSpec::Story::World, which included in the context > that stories are defined and run in (David, feel free to correct me if > this is not 100% accurate). > Hmm,

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Bart Zonneveld
Hmm, all of a sudden this thread is spiraling away from my original question :). Which is good of course :). I've made some inline comments. On 17-mrt-2008, at 13:12, David Chelimsky wrote: > On Mon, Mar 17, 2008 at 7:05 AM, Ashley Moran > <[EMAIL PROTECTED]> wrote: >> On 13/03/2008, Bart Zonne

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Zach Dennis
I have been putting helper methods inside of my own modules and then including them in RSpec::Story::World, which included in the context that stories are defined and run in (David, feel free to correct me if this is not 100% accurate). module Spec::Story::World def foo # this is now availa

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Ashley Moran
On 17/03/2008, Corey Haines <[EMAIL PROTECTED]> wrote: > > As an interim solution, we added this as helper file in the stories root. > The key was figuring out what to mixin to. > > class ActionController::Integration::Session > # ... > end > > -Corey Pretty neat! Unfortunately I don't think

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Corey Haines
As an interim solution, we added this as helper file in the stories root. The key was figuring out what to mixin to. class ActionController::Integration::Session def with_input(id) with_tag('input[id=?]',id) end def with_label(text) with_tag('label',text) end

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Ashley Moran
> > I have mixed feelings about this. If you do build up a library of step > groups, having explicit scoping like this can be a great benefit. > Agreed it makes things less convenient otherwise. Hi David Not sure I follow. Do you mean explicit scoping as having to type "steps_for(:login)."? I

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread David Chelimsky
On Mon, Mar 17, 2008 at 7:05 AM, Ashley Moran <[EMAIL PROTECTED]> wrote: > On 13/03/2008, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > > > Hey list, > > > > I'm refactoring some much-used functionality into a common_steps step > > group. Methods like this are in there: > > > Hi Bart / list > > This

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Ashley Moran
On 13/03/2008, Bart Zonneveld <[EMAIL PROTECTED]> wrote: > > Hey list, > > I'm refactoring some much-used functionality into a common_steps step > group. Methods like this are in there: Hi Bart / list This is not quite what you are thinking but I've noticed something strange about steps_for. B

Re: [rspec-users] Specifing methods in a steps_for block

2008-03-17 Thread Bart Zonneveld
No replies? That doesn't happen very often :). regards, bartz On 13-mrt-2008, at 14:13, Bart Zonneveld wrote: > Hey list, > > I'm refactoring some much-used functionality into a common_steps step > group. Methods like this are in there: > > steps_for :common do >Given "a number of existing $

[rspec-users] Specifing methods in a steps_for block

2008-03-13 Thread Bart Zonneveld
Hey list, I'm refactoring some much-used functionality into a common_steps step group. Methods like this are in there: steps_for :common do Given "a number of existing $types?" do |type| @initial_item_count = type.singularize.classify.constantize.count end When "the user adds an