[rspec-users] Cucumber: The Mysteries of Before(), After(), World() etc

Matt Wynne matt at mattwynne.net
Thu Nov 13 10:15:01 EST 2008


On 13 Nov 2008, at 15:01, David Chelimsky wrote:
> On Thu, Nov 13, 2008 at 8:59 AM, Peter Jaros  
> <peter.a.jaros at gmail.com> wrote:
>> On Wed, Nov 12, 2008 at 8:59 AM, David Chelimsky <dchelimsky at gmail.com 
>> > wrote:
>>> On Wed, Nov 12, 2008 at 7:30 AM, aslak hellesoy
>>> <aslak.hellesoy at gmail.com> wrote:
>>>> World do
>>>> world = Object.new
>>>> world.extend(Logging::Logger)
>>>> world
>>>> end
>>>
>>> World do
>>> returning Cucumber::Rails::World do |world|
>>>   world.extend(Logging::Logger)
>>> end
>>> end
>>
>> It would be really nice to be able to do:
>>
>> World do |world|
>> returning world do |w|
>>  w.extend(Logging::Logger)
>> end
>> end
>>
>> This way steps files could extend the world by adding to a chain,
>> agnostic of the nature of the original world object.
>
> That's a cool idea - can you put a feature request in lighthouse?
>
> http://rspec.lighthouseapp.com/projects/16211-cucumber/overview
>
> Cheers,
> David

That's how I'd originally expected it to work, TBH. When I looked at  
the source and it didn't, I got scared :)

cheers,
Matt


More information about the rspec-users mailing list